diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..6ef54e62a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,41 @@ +sudo: required +dist: trusty + +language: cpp + +compiler: + - gcc + +os: + - linux + +branches: + only: + - master + +notifications: + irc: + channels: + - "chat.freenode.net#rawtherapee" + template: + - "%{repository}/%{branch} (%{commit} - %{author}): %{build_url}: %{message}" + email: + on_success: change + on_failure: always + +env: + global: + - OMP_NUM_THREADS=4 + +before_install: + - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y + - sudo apt-get -qq update + - sudo apt-get install build-essential cmake curl g++-6 gcc-6 git libbz2-dev libcanberra-gtk-dev libexiv2-dev libexpat-dev libfftw3-dev libglibmm-2.4-dev libgtk2.0-dev libgtkmm-2.4-dev libiptcdata0-dev libjpeg8-dev liblcms2-dev libpng12-dev libsigc++-2.0-dev libtiff5-dev zlib1g-dev + - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 + +before_script: + - mkdir build + - cd build + - cmake -DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" -DWITH_LTO="OFF" -DPROC_TARGET_NUMBER="2" .. + +script: make diff --git a/clean.sh b/clean.sh deleted file mode 100755 index 5500bf28e..000000000 --- a/clean.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -find -name CMakeCache.txt -delete -rm install_manifest.txt - -rm -r ./CMakeFiles -rm -r ./rtengine/CMakeFiles -rm -r ./rtexif/CMakeFiles -rm -r ./rtgui/CMakeFiles -rm -r ./rtdata/CMakeFiles - -rm ./cmake* -rm ./rtengine/cmake* -rm ./rtexif/cmake* -rm ./rtgui/cmake* -rm ./rtdata/cmake* - -rm ./Makefile -rm ./rtengine/Makefile -rm ./rtexif/Makefile -rm ./rtgui/Makefile -rm ./rtdata/Makefile - -rm ./rtengine/librtengine.so -rm ./rtengine/librtengine.a -rm ./rtgui/rawtherapee -rm ./rtexif/librtexif.so -rm ./rtexif/librtexif.a -exit 0 diff --git a/rtdata/images/Dark/actions/colorPickers-hide.png b/rtdata/images/Dark/actions/colorPickers-hide.png new file mode 100644 index 000000000..54b33a7fb Binary files /dev/null and b/rtdata/images/Dark/actions/colorPickers-hide.png differ diff --git a/rtdata/images/Dark/actions/colorPickers-show.png b/rtdata/images/Dark/actions/colorPickers-show.png new file mode 100644 index 000000000..d9d039c2b Binary files /dev/null and b/rtdata/images/Dark/actions/colorPickers-show.png differ diff --git a/rtdata/images/Dark/actions/gtk-color-picker-add.png b/rtdata/images/Dark/actions/gtk-color-picker-add.png new file mode 100644 index 000000000..77a30c250 Binary files /dev/null and b/rtdata/images/Dark/actions/gtk-color-picker-add.png differ diff --git a/rtdata/images/Dark/actions/spGamutCheck.png b/rtdata/images/Dark/actions/spGamutCheck.png new file mode 100644 index 000000000..ab812272a Binary files /dev/null and b/rtdata/images/Dark/actions/spGamutCheck.png differ diff --git a/rtdata/images/Dark/actions/unchanged-18.png b/rtdata/images/Dark/actions/unchanged-18.png new file mode 100644 index 000000000..9d08dda26 Binary files /dev/null and b/rtdata/images/Dark/actions/unchanged-18.png differ diff --git a/rtdata/images/Dark/actions/unchanged-22.png b/rtdata/images/Dark/actions/unchanged-22.png new file mode 100644 index 000000000..db03d456a Binary files /dev/null and b/rtdata/images/Dark/actions/unchanged-22.png differ diff --git a/rtdata/images/Light/actions/colorPickers-hide.png b/rtdata/images/Light/actions/colorPickers-hide.png new file mode 100644 index 000000000..434087f1c Binary files /dev/null and b/rtdata/images/Light/actions/colorPickers-hide.png differ diff --git a/rtdata/images/Light/actions/colorPickers-show.png b/rtdata/images/Light/actions/colorPickers-show.png new file mode 100644 index 000000000..d93deb3eb Binary files /dev/null and b/rtdata/images/Light/actions/colorPickers-show.png differ diff --git a/rtdata/images/Light/actions/gtk-color-picker-add.png b/rtdata/images/Light/actions/gtk-color-picker-add.png new file mode 100644 index 000000000..01d2b6a0b Binary files /dev/null and b/rtdata/images/Light/actions/gtk-color-picker-add.png differ diff --git a/rtdata/images/Light/actions/spGamutCheck.png b/rtdata/images/Light/actions/spGamutCheck.png new file mode 100644 index 000000000..b1ae3e423 Binary files /dev/null and b/rtdata/images/Light/actions/spGamutCheck.png differ diff --git a/rtdata/images/Light/actions/unchanged-18.png b/rtdata/images/Light/actions/unchanged-18.png new file mode 100644 index 000000000..9d08dda26 Binary files /dev/null and b/rtdata/images/Light/actions/unchanged-18.png differ diff --git a/rtdata/images/Light/actions/unchanged-22.png b/rtdata/images/Light/actions/unchanged-22.png new file mode 100644 index 000000000..db03d456a Binary files /dev/null and b/rtdata/images/Light/actions/unchanged-22.png differ diff --git a/rtdata/languages/Catala b/rtdata/languages/Catala index d54566400..f73df46a7 100644 --- a/rtdata/languages/Catala +++ b/rtdata/languages/Catala @@ -1306,6 +1306,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -1380,7 +1381,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1406,6 +1407,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1423,6 +1425,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1449,6 +1452,9 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PROGRESSBAR_SNAPSHOT_ADDED;Snapshot added !SAVEDLG_FORCEFORMATOPTS;Force saving options !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1644,7 +1650,6 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Can be used on raw and non-raw images.\n\nFor non-raw images noise reduction of luminance depends on the gamma of the input color profile. An sRGB gamma is assumed, thus if the image uses an input color profile of a different gamma, the effects of luminance noise reduction will differ. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA_TOOLTIP;Gamma varies noise reduction strength across the range of tones. Smaller values will target shadows, while larger values will stretch the effect to the brighter tones. @@ -1655,13 +1660,11 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. @@ -1724,6 +1727,8 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. @@ -1858,7 +1863,6 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_RGBCURVES_LUMAMODE_TOOLTIP;Luminosity mode allows to vary the contribution of R, G and B channels to the luminosity of the image, without altering image color. !TP_SAVEDIALOG_OK_TIP;Shortcut: Ctrl-Enter !TP_SHADOWSHLIGHTS_SHARPMASK;Sharp mask -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_WAVELET_1;Level 1 !TP_WAVELET_2;Level 2 !TP_WAVELET_3;Level 3 diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified) index 9b6385249..72753272c 100644 --- a/rtdata/languages/Chinese (Simplified) +++ b/rtdata/languages/Chinese (Simplified) @@ -1223,6 +1223,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 !MAIN_BUTTON_NAVSYNC_TOOLTIP;Synchronize the File Browser or Filmstrip with the Editor to reveal the thumbnail of the currently opened image, and clear any active filters.\nShortcut: x\n\nAs above, but without clearing active filters:\nShortcut: y\n(Note that the thumbnail of the opened image will not be shown if filtered out). @@ -1318,7 +1319,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1353,6 +1354,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1375,7 +1377,8 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1417,6 +1420,8 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PROGRESSDLG_PROFILECHANGEDINBROWSER;Processing profile changed in browser !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1424,6 +1429,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_TOOLTIP;Linear: will produce a normal linear response.\nSpecial effects: will produce special effects by mixing channels non-linearly. !TP_BWMIX_AUTOCH_TIP;Calculate values optimizing Channel Mixer. @@ -1579,7 +1585,6 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Can be used on raw and non-raw images.\n\nFor non-raw images noise reduction of luminance depends on the gamma of the input color profile. An sRGB gamma is assumed, thus if the image uses an input color profile of a different gamma, the effects of luminance noise reduction will differ. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1591,13 +1596,11 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. @@ -1660,6 +1663,8 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. @@ -1824,7 +1829,6 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_RETINEX_VIEW_TRAN;Transmission - Auto !TP_RETINEX_VIEW_TRAN2;Transmission - Fixed !TP_RETINEX_VIEW_UNSHARP;Unsharp mask -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 !TP_SHARPENMICRO_UNIFORMITY;Uniformity diff --git a/rtdata/languages/Chinese (Traditional) b/rtdata/languages/Chinese (Traditional) index c797a80d8..a8101c373 100644 --- a/rtdata/languages/Chinese (Traditional) +++ b/rtdata/languages/Chinese (Traditional) @@ -958,6 +958,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1124,7 +1125,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1160,6 +1161,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1183,7 +1185,8 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1240,6 +1243,8 @@ TP_WBALANCE_TEMPERATURE;色溫 !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1247,6 +1252,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1453,7 +1459,6 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Can be used on raw and non-raw images.\n\nFor non-raw images noise reduction of luminance depends on the gamma of the input color profile. An sRGB gamma is assumed, thus if the image uses an input color profile of a different gamma, the effects of luminance noise reduction will differ. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1468,13 +1473,11 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. @@ -1584,6 +1587,8 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. @@ -1799,7 +1804,6 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index f3142f30d..015dc1a7d 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -33,7 +33,8 @@ #32 2014-10-24 updated by mkyral #33 2015-02-22 updated by mkyral #34 2015-07-09 updated by mkyral -#38 2015-11-24 updated by mkyral +#35 2015-11-24 updated by mkyral +#36 2016-10-18 updated by mkyral ABOUT_TAB_BUILD;Verze ABOUT_TAB_CREDITS;Zásluhy @@ -203,6 +204,7 @@ FILEBROWSER_SHOWEDITEDHINT;Ukázat upravené obrázky.\nZkratka: 7 FILEBROWSER_SHOWEDITEDNOTHINT;Ukázat neupravené obrázky.\nZkratka: 6 FILEBROWSER_SHOWEXIFINFO;Zobrazit Exif informace.\n\nZkratky:\ni - režim více karet editoru,\nAlt-i - režim jedné karty editoru. FILEBROWSER_SHOWNOTTRASHHINT;Zobrazit pouze nesmazané obrázky. +FILEBROWSER_SHOWORIGINALHINT;Zobrazí pouze originální obrázky.\n\nPokud existuje několik obrázků se stejným názvem, ale rozdílnými příponami, bude jako originál vybrán ten, jehož přípona je nejvýše v seznamu příponve Volby > Prohlížeč souborů > Analyzované přípony. FILEBROWSER_SHOWRANK1HINT;Ukázat obrázky hodnocené jednou hvězdičkou.\nZkratka: 1 FILEBROWSER_SHOWRANK2HINT;Ukázat obrázky hodnocené dvěma hvězdičkami.\nZkratka: 2 FILEBROWSER_SHOWRANK3HINT;Ukázat obrázky hodnocené třemi hvězdičkami.\nZkratka: 3 @@ -231,6 +233,7 @@ FILECHOOSER_FILTER_SAME;Stejný formát jako aktuální fotka FILECHOOSER_FILTER_TIFF;Soubory TIFF GENERAL_ABOUT;O programu GENERAL_AFTER;Poté +GENERAL_APPLY;Použít GENERAL_ASIMAGE;Jako obrázek GENERAL_AUTO;Automaticky GENERAL_BEFORE;Před @@ -246,6 +249,7 @@ GENERAL_NA;n/a GENERAL_NO;Ne GENERAL_NONE;Nic GENERAL_OK;OK +GENERAL_OPEN;Otevřít GENERAL_PORTRAIT;Na výšku GENERAL_SAVE;Uložit GENERAL_UNCHANGED;(Beze změny) @@ -289,8 +293,8 @@ HISTORY_MSG_23;Doostření - Práh HISTORY_MSG_24;Doostření - Pouze okraje HISTORY_MSG_25;Doostření - Poloměr detekce okrajů HISTORY_MSG_26;Doostření - Tolerance okrajů -HISTORY_MSG_27;Doostření - Omezení haló art. -HISTORY_MSG_28;Doostření - Míra omezení haló art. +HISTORY_MSG_27;Doostření - Omezení halo efektu +HISTORY_MSG_28;Doostření - Míra omezení halo efektu HISTORY_MSG_29;Doostření - Metoda HISTORY_MSG_30;RLD - Poloměr HISTORY_MSG_31;RLD - Míra @@ -428,6 +432,7 @@ HISTORY_MSG_162;Mapování tónů HISTORY_MSG_163;RGB křivky - Červená HISTORY_MSG_164;RGB křivky - Zelená HISTORY_MSG_165;RGB křivky - Modrá +HISTORY_MSG_166;Expozice - Obnovení HISTORY_MSG_167;Metoda demozajkování HISTORY_MSG_168;L*a*b* - CC křivka HISTORY_MSG_169;L*a*b* - CH Křivka @@ -627,7 +632,7 @@ HISTORY_MSG_363;Vlnka - Zůstatek - Síla komprese HISTORY_MSG_364;Vlnka - Dokončení - Vyrovnání kontrastu HISTORY_MSG_365;Vlnka - Dokončení - Vyvážení rozdílů HISTORY_MSG_366;Vlnka - Zůstatek - Gama komprese -HISTORY_MSG_367;Vlnka - DH - Křivka místního kontrastu +HISTORY_MSG_367;Vlnka - Finální "Po" křivka kontrastu HISTORY_MSG_368;Vlnka - Dokončení - Vyrovnání kontrastu HISTORY_MSG_369;Vlnka - Dokončení - Metoda vyvážení HISTORY_MSG_370;Vlnka - Dokončení - Křivka místního kontrastu @@ -638,8 +643,8 @@ HISTORY_MSG_374;Doostření MR - Práh HISTORY_MSG_375;Doostření MR - Pouze hrany HISTORY_MSG_376;Doostření MR- Poloměr detekce hran HISTORY_MSG_377;Doostření MR - Tolerance hran -HISTORY_MSG_378;Doostření MR - Omezení haló art. -HISTORY_MSG_379;Doostření MR - Míra omezení haló art. +HISTORY_MSG_378;Doostření MR - Omezení halo efektu +HISTORY_MSG_379;Doostření MR - Míra omezení halo efektu HISTORY_MSG_380;Doostření - Metoda HISTORY_MSG_381;Doostření RDL - Poloměr HISTORY_MSG_382;Doostření RDL - Míra @@ -668,14 +673,14 @@ HISTORY_MSG_404;Vlnka - DH - Základní zesílení HISTORY_MSG_405;Vlnka - Odšumění - Úroveň 4 HISTORY_MSG_406;Vlnka - DH - Sousední pixely HISTORY_MSG_407;Retinex - Metoda -HISTORY_MSG_408;Retinex - Sousední -HISTORY_MSG_409;Retinex - Zisk +HISTORY_MSG_408;Retinex - Poloměr +HISTORY_MSG_409;Retinex - Kontrast HISTORY_MSG_410;Retinex - Posun HISTORY_MSG_411;Retinex - Síla -HISTORY_MSG_412;Retinex - Míra -HISTORY_MSG_413;Retinex - odchylka +HISTORY_MSG_412;Retinex - Gaussův gradient +HISTORY_MSG_413;Retinex - Kontrast HISTORY_MSG_414;Retinex - Histogram - Lab -HISTORY_MSG_415;Retinex - přenos +HISTORY_MSG_415;Retinex - Přenos HISTORY_MSG_416;Retinex HISTORY_MSG_417;Retinex - Medián přenosu HISTORY_MSG_418;Retinex - Práh @@ -685,8 +690,25 @@ HISTORY_MSG_421;Retinex - Gama HISTORY_MSG_422;Retinex - Gama HISTORY_MSG_423;Retinex - Sklon gamy HISTORY_MSG_424;Retinex - Práh zachování jasů -HISTORY_MSG_425;Retinex - Základní log +HISTORY_MSG_425;Retinex - Základ log. HISTORY_MSG_426;Retinex - Korekce odstínu +HISTORY_MSG_427;Výstupní záměr reprodukce +HISTORY_MSG_428;Záměr reprodukce monitoru +HISTORY_MSG_429;Retinex - Průchody +HISTORY_MSG_430;Retinex - Přenos gradientu +HISTORY_MSG_431;Retinex - Síla gradientu +HISTORY_MSG_432;Retinex - M - Světla +HISTORY_MSG_433;Retinex - M - Světla tóny +HISTORY_MSG_434;Retinex - M - Stíny +HISTORY_MSG_435;Retinex - M - Stíny tóny +HISTORY_MSG_436;Retinex - M - poloměr +HISTORY_MSG_437;Retinex - M - Metoda +HISTORY_MSG_438;Retinex - M - Korekce +HISTORY_MSG_439;Retinex - Zpracování +HISTORY_MSG_440;Metoda KdDÚ +HISTORY_MSG_441;Retinex - Přenos zisku +HISTORY_MSG_442;Retinex - Měřítko +HISTORY_MSG_443;Kompenzace výstupního černého bodu HISTORY_NEWSNAPSHOT;Přidat HISTORY_NEWSNAPSHOT_TOOLTIP;Zkratka: Alt-s HISTORY_SNAPSHOT;Snímek @@ -739,6 +761,7 @@ MAIN_BUTTON_NAVSYNC_TOOLTIP;Synchronizovat prohlížeč souborů s editorem pro MAIN_BUTTON_PREFERENCES;Volby MAIN_BUTTON_PUTTOQUEUE_TOOLTIP;Vložit současný obrázek do fronty zpracování.\nZkratka: Ctrl+b MAIN_BUTTON_SAVE_TOOLTIP;Uložit současný obrázek.\nZkratka: Ctrl+s +MAIN_BUTTON_SENDTOEDITOR;Upravit obrázek v externím editoru MAIN_BUTTON_SENDTOEDITOR_TOOLTIP;Editovat současný obrázek v externím editoru.\nZkratka: Ctrl+e MAIN_BUTTON_SHOWHIDESIDEPANELS_TOOLTIP;Zobrazit/skrýt všechny postranní panely.\nZkratka: m MAIN_BUTTON_UNFULLSCREEN;Ukončit mód celé obrazovky @@ -803,6 +826,7 @@ MAIN_TOOLTIP_SHOWHIDERP1;Zobrazit/skrýt pravý panel.\nZkratka: Alt-l MAIN_TOOLTIP_SHOWHIDETP1;Zobrazit/skrýt horní panel.\nZkratka: Shift-l MAIN_TOOLTIP_THRESHOLD;Práh MAIN_TOOLTIP_TOGGLE;Přepnout pohled Před a Po.\nZkratka: Shift-b +MONITOR_PROFILE_SYSTEM;Nastavení systému NAVIGATOR_B;B: NAVIGATOR_G;G: NAVIGATOR_H;H: @@ -862,6 +886,7 @@ PARTIALPASTE_PREPROCESS_DEADPIXFILT;Filtr mrtvých pixelů PARTIALPASTE_PREPROCESS_GREENEQUIL;Vyrovnání zelené PARTIALPASTE_PREPROCESS_HOTPIXFILT;Filtr vypálených pixelů PARTIALPASTE_PREPROCESS_LINEDENOISE;Filtrovat linkové rušení +PARTIALPASTE_PRSHARPENING;Doostření po změně velikosti PARTIALPASTE_RAWCACORR_AUTO;Automatická korekce CA PARTIALPASTE_RAWCACORR_CABLUE;CA modrá PARTIALPASTE_RAWCACORR_CARED;CA červená @@ -1010,6 +1035,9 @@ PREFERENCES_MENUGROUPRANK;Skupina "Hodnocení" PREFERENCES_MENUOPTIONS;Volby místní nabídky PREFERENCES_METADATA;Metadata PREFERENCES_MIN;Velmi malá (100x115) +PREFERENCES_MONBPC;Kompenzace černého bodu pro L*a*b*->Přizpůsobení pro monitor +PREFERENCES_MONINTENT;Výchozí záměr monitoru +PREFERENCES_MONPROFILE;Výchozí profil monitoru PREFERENCES_MULTITAB;Mód více karet editoru PREFERENCES_MULTITABDUALMON;Mód více karet editoru ve vlastním okně PREFERENCES_NAVGUIDEBRUSH;Barva vodítek navigátoru @@ -1024,10 +1052,12 @@ PREFERENCES_OVERLAY_FILENAMES;Překrýt jména souborů na náhledech v prohlí PREFERENCES_OVERLAY_FILENAMES_FILMSTRIP;Překrýt jména souborů na náhledech v editoru PREFERENCES_OVERWRITEOUTPUTFILE;Přepsat existující soubory PREFERENCES_PANFACTORLABEL;Zrychlení posunu výřezu -PREFERENCES_PARSEDEXT;Zachytávané přípony +PREFERENCES_PARSEDEXT;Analyzované přípony PREFERENCES_PARSEDEXTADD;Přidat příponu PREFERENCES_PARSEDEXTADDHINT;Vymazat označenou příponu ze seznamu. PREFERENCES_PARSEDEXTDELHINT;Vymazat označenou příponu ze seznamu. +PREFERENCES_PARSEDEXTDOWNHINT;Vybranou příponu posunout na seznamu níže. +PREFERENCES_PARSEDEXTUPHINT;Vybranou příponu posunout na seznamu výše. PREFERENCES_PREVDEMO;Metoda demozajkování náhledu PREFERENCES_PREVDEMO_FAST;Rychlá PREFERENCES_PREVDEMO_LABEL;Metoda demozajkování pro náhled při přiblížení menším než 100%: @@ -1038,13 +1068,15 @@ PREFERENCES_PROFILEPRCACHE;Profil v mezipaměti PREFERENCES_PROFILEPRFILE;Profil uložený se zdrojovým souborem PREFERENCES_PROFILESAVECACHE;Ukládat parametry zpracování do mezipaměti PREFERENCES_PROFILESAVEINPUT;Ukládat parametry zpracování spolu se zdrojovým souborem +PREFERENCES_PROFILE_NONE;Nic PREFERENCES_PROPERTY;Vlastnost PREFERENCES_PSPATH;Instalační složka Adobe Photoshop PREFERENCES_REMEMBERZOOMPAN;Zapamatovat si procento přiblížení a posun obrázku PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Zapamatovat si procento přiblížení a posun aktuálního obrázku a použít tyto hodnoty při otevírání nového obrázku.\n\nTato volba funguje pouze v režimu "Mód jedné karty editoru" a volba "Metoda demozajkování pro náhled při přiblížení menším než 100%" je nastavena na "Stejně jako v PP3". PREFERENCES_RGBDTL_LABEL;Maximální počet vláken pro redukci šumu a úrovně vlnky PREFERENCES_RGBDTL_TOOLTIP;Pro automatické nastavení maximálního možného počtu vláken ponechte nastaveno na "0". Čím více vláken běží paralelně, tím rychlejší je výpočet. Paměťové nároky najdete na RawPedii. -PREFERENCES_SELECTFONT;Vybrat písmo +PREFERENCES_SELECTFONT;Vyberte globální písmo +PREFERENCES_SELECTFONT_COLPICKER;Vybrat písmo pro Průzkumníka barev PREFERENCES_SELECTLANG;Volba jazyka PREFERENCES_SELECTTHEME;Zvolit vzhled PREFERENCES_SERIALIZE_TIFF_READ;Nastavení čtení Tiff @@ -1140,6 +1172,8 @@ SAVEDLG_SUBSAMP_TOOLTIP;Nejlepší komprese:\nJ:a:b 4:2:0\nh/v 2/2\nO polovinu s SAVEDLG_TIFFUNCOMPRESSED;Nekomprimovaný TIFF SAVEDLG_WARNFILENAME;Soubor bude pojmenován SHCSELECTOR_TOOLTIP;Klikněte pravým tlačítkem myši pro obnovení výchozí pozice těchto tří posuvníků. +SOFTPROOF_GAMUTCHECK_TOOLTIP;Pokud je aktivní, indikuje šedou barvou pixely, které se dostaly mimo paletu výstupního profilu. +SOFTPROOF_TOOLTIP;Jemně korekční\nPokud je aktivní. můžete simulovat vykreslení generované výstupním profilem nástroje ICM. Velmi užitečné pro simulaci tiskových výstupů. THRESHOLDSELECTOR_B;Dole THRESHOLDSELECTOR_BL;Dole vlevo THRESHOLDSELECTOR_BR;Dole vpravo @@ -1147,8 +1181,9 @@ THRESHOLDSELECTOR_HINT;Držte klávesu Shift pro přesun individuálních THRESHOLDSELECTOR_T;Nahoře THRESHOLDSELECTOR_TL;Nahoře vlevo THRESHOLDSELECTOR_TR;Nahoře vpravo +TOOLBAR_TOOLTIP_COLORPICKER;Uzamykatelný Průzkumník barev\n\nPokud je povolen:\nPřidáte průzkumníka barev kliknutím levým tlačítkem myši do náhledu\nPodržením levého tlačítka myši a tažením průzkumníka přesunete\nPokud na průzkumníka kliknete pravým tlačítkem, dojde k jeho smazání\nSmazání všech průzkumníků po stisknutí klávesy Shift a pravého tlačítka myši\nKliknutím pravým tlačítkem kdekoli mimo průzkumníka přepne zpět na nástroj posunu TOOLBAR_TOOLTIP_CROP;Oříznutí výběru.\nZkratka: c\nOblast výřezu posunete pomocí Shift + tažení myši -TOOLBAR_TOOLTIP_HAND;Nástroj ruka.\nZkratka: h +TOOLBAR_TOOLTIP_HAND;Posun.\nZkratka: h TOOLBAR_TOOLTIP_STRAIGHTEN;Vyznačení roviny / rotace.\nZkratka: s\n\nZobrazení míry rotace pomocí vodící linky na náhledu snímky. Úhel rotace je zobrazen vedle vodící linky. Střed rotace je geometrický střed snímku. TOOLBAR_TOOLTIP_WB;Bodové vyvážení bílé.\nZkratka: w TP_BWMIX_ALGO;Algoritmus OYCPM @@ -1214,6 +1249,10 @@ TP_BWMIX_VAL;L TP_CACORRECTION_BLUE;Modrá TP_CACORRECTION_LABEL;Korekce chromatické aberace TP_CACORRECTION_RED;Červená +TP_CBDL_AFT;Po černobílé +TP_CBDL_BEF;Před černobílou +TP_CBDL_METHOD;Umístění procesu +TP_CBDL_METHOD_TOOLTIP;Vyberte, zda bude nástroj Kontrast dle detailu úrovní po nástroji Černobílá, což znamená, že bude pracovat v prostoru L*a*b, nebo před ním, což znamená, že bude pracovat v RGB prostoru. TP_CHMIXER_BLUE;Modrý kanál TP_CHMIXER_GREEN;Zelený kanál TP_CHMIXER_LABEL;Míchání kanálů @@ -1235,7 +1274,7 @@ TP_COLORAPP_ALGO_JS;Světlost + Nasycení (JS) TP_COLORAPP_ALGO_QM;Jas a pestrobarevnost (QM) TP_COLORAPP_ALGO_TOOLTIP;Umožňuje vybrat mezi podmnožinou nebo všemi parametry. TP_COLORAPP_BADPIXSL;Filtr vypálených/mrtvých pixelů -TP_COLORAPP_BADPIXSL_TOOLTIP;Potlačení vypálených/mrtvých (jasně zabarvených) pixelů.\n0 = Bez efektu\n1 = Medián\n2 = Gaussový.\nPopřípadě obrázek upravte tak, aby jste se vyhnuli velmi tmavým stínům.\n\nTyto artefakty vznikají díky omezením CIECAM02. +TP_COLORAPP_BADPIXSL_TOOLTIP;Potlačení vypálených/mrtvých (jasně zabarvených) pixelů.\n0 = Bez efektu\n1 = Medián\n2 = Gaussovo.\nPopřípadě obrázek upravte tak, aby jste se vyhnuli velmi tmavým stínům.\n\nTyto artefakty vznikají díky omezením CIECAM02. TP_COLORAPP_BRIGHT;Jas (O) TP_COLORAPP_BRIGHT_TOOLTIP;Jas v CIECAM02 bere v potaz svítivost bílé a rozdíly jasů mezi L*a*b* a RGB. TP_COLORAPP_CHROMA;Barevnost (C) @@ -1354,6 +1393,12 @@ TP_DARKFRAME_LABEL;Tmavý snímek TP_DEFRINGE_LABEL;Odstranění lemu TP_DEFRINGE_RADIUS;Poloměr TP_DEFRINGE_THRESHOLD;Práh +TP_DIRPYRDENOISE_3X3;3×3 +TP_DIRPYRDENOISE_3X3_SOFT;3×3 jemný +TP_DIRPYRDENOISE_5X5;5×5 +TP_DIRPYRDENOISE_5X5_SOFT;5×5 jemný +TP_DIRPYRDENOISE_7X7;7×7 +TP_DIRPYRDENOISE_9X9;9×9 TP_DIRPYRDENOISE_ABM;Pouze barevnost TP_DIRPYRDENOISE_AUT;Automatická celková TP_DIRPYRDENOISE_AUTO;Automatická celková @@ -1369,7 +1414,6 @@ TP_DIRPYRDENOISE_CUR;Křivka TP_DIRPYRDENOISE_CURVEEDITOR_CC;Barevnost TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Zvýší (násobí) hodnoty všech barevných posuvníků.\nKřivka vám umožní nastavit sílu redukce barevného šumu jako funkci barvy. Například pro zvýšení účinku v oblastech s nízkým nasycení a snížení v oblastech s vysokým nasycením. TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Moduluje akci 'jasového' odstranění šumu -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Může být použito jak pro raw tak i pro ostatní obrázky.\n\nPokud je použito pro ostatní obrázky, závisí redukce šumu dle jasu na gamě vstupního barevného profilu. Předpokládá se sRGB gama a proto se může výsledek u obrázků s rozdílnou gamou barevného profilu lišit. TP_DIRPYRDENOISE_ENH;Vylepšený režim TP_DIRPYRDENOISE_ENH_TOOLTIP;Zvýší kvalitu odstranění šumu, ale zároveň prodlouží dobu zpracování o 20%. TP_DIRPYRDENOISE_GAMMA;Gama @@ -1384,22 +1428,22 @@ TP_DIRPYRDENOISE_LPLABM;Vyvážená L* (trochu) + a*b* (normální) TP_DIRPYRDENOISE_LTYPE;Ovládání jasu TP_DIRPYRDENOISE_LUMA;Jas TP_DIRPYRDENOISE_LUMAFR;Jas -TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Vlnková transformace na svítivost a Fourierova transformace pro detail svítivosti TP_DIRPYRDENOISE_MAN;Ručně TP_DIRPYRDENOISE_MANU;Ručně TP_DIRPYRDENOISE_MED;Filtr medián TP_DIRPYRDENOISE_MEDMETHOD;Metoda mediánu TP_DIRPYRDENOISE_MEDTYPE;Typ mediánu -TP_DIRPYRDENOISE_MED_TOOLTIP;Povolit odstranění šumu Medián TP_DIRPYRDENOISE_METHOD;Metoda TP_DIRPYRDENOISE_METHOD11;Kvalita TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Kvalita může být přizpůsobena vzoru šumu. Nastavení "Vysoká" vylepší efekt redukce šumu za cenu navýšení času zpracování. TP_DIRPYRDENOISE_METHOD_TOOLTIP;Pro raw obrázky může být použita jak RGB tak i L*a*b* metoda.\n\nPro ostatní obrázky bude vždy použita metoda L*a*b* bez ohledu na výběr. TP_DIRPYRDENOISE_METM_TOOLTIP;Pokud je použito 'Pouze Jas' a 'L*a*b*' metody, bude při odstranění šumu použit filtr medián hned po vlnkové transformaci.\nPokud je použit "RGB" mód, bude filtr použit až na úplný závěr procesu redukce šumu. +TP_DIRPYRDENOISE_MET_TOOLTIP;Aplikuje filtr medián požadované velikosti okna. Čím větší velikost okna, tím déle bude zpracování trvat.\n\n3×3 jemný: upraví 5 pixelů v okně 3x3 pixely.\n3×3: upraví 9 pixelů v okně 3x3 pixely.\n5×5 jemný; upraví 13 pixelů v okně 5x5 pixelů.\n5×5: upraví 25 pixelů v okně 5x5 pixelů.\n7×7: upraví 49 pixelů v okně 7x7 pixelů.\n9×9: upraví 81 pixelů v okně 9x9 pixelů.\n\nV některých případech může být větší kvality dosaženo pomocí několika průběhů s menšími okny než jedním průběhem s velkým oknem. TP_DIRPYRDENOISE_NOISELABEL;Náhled šumu: Průměr=%1 Výšky=%2 TP_DIRPYRDENOISE_NOISELABELEMPTY;Náhled šumu: Průměr= - Výšky= - TP_DIRPYRDENOISE_NRESID_TOOLTIP;Zobrazuje zbývající úroveň zašumění části obrázku viditelného v náhledu po vlnkové transformaci.\n\n>300 Hodně šumu\n100-300 Šum\n50-100 Málo šumu\n<50 Velmi málo šumu\n\nUpozornění: hodnoty RGB a L*a*b* režimu se budou lišit. Protože v RGB režimu nedochází ke kompletnímu oddělení jasu a barev jsou RGB hodnoty jméně přesné TP_DIRPYRDENOISE_PASSES;Počet průchodů mediánu +TP_DIRPYRDENOISE_PASSES_TOOLTIP;Aplikování tří průchodů filtru medián s oknem 3×3 často vede k lepšímu výsledku než jednou aplikovaný filtr medián s oknem 7×7. TP_DIRPYRDENOISE_PON;Více zónová automatika TP_DIRPYRDENOISE_PRE;Více zónový náhled TP_DIRPYRDENOISE_PREV;Náhled @@ -1464,6 +1508,7 @@ TP_EXPOSURE_TCMODE_WEIGHTEDSTD;Běžný vážený TP_EXPOS_BLACKPOINT_LABEL;Raw černé body TP_EXPOS_WHITEPOINT_LABEL;Raw bílé body TP_FILMSIMULATION_LABEL;Simulace filmu +TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee je nakonfigurován aby hledal Hald CLUT obrázky pro nástroj Simulace filmu ve složce, jejíž načítání trvá velmi dlouho.\nZkontrolujte prosím nastavení v menu Volby > Zpracování obrázku > Simulace filmu.\nNastavená složka by měla buď obsahovat jen a pouze Hald CLUT obrázky nebo být prázdná, pokud nechcete nástroj Simulace filmu používat.\n\nVíce informací získáte v článku o nástroji Simulace filmu na RawPedii.\n\nChcete zrušit právě probíhající prohledávání složky? TP_FILMSIMULATION_STRENGTH;Síla TP_FILMSIMULATION_ZEROCLUTSFOUND;Nastavte složku HaldCLUT v nastaveních TP_FLATFIELD_AUTOSELECT;Automatický výběr @@ -1513,6 +1558,8 @@ TP_ICM_APPLYLOOKTABLE;Tabulka vzhledu TP_ICM_APPLYLOOKTABLE_TOOLTIP;Použije vloženou DCP tabulku vzhledu. Nastavení je dostupné pouze pokud ji vybrané DCP obsahuje. TP_ICM_BLENDCMSMATRIX;Smísení ICC světel s matici TP_ICM_BLENDCMSMATRIX_TOOLTIP;Povolit obnovení vypálených jasů při použití ICC profilů založených na LUT. +TP_ICM_BPC;Kompenzace černého bodu +TP_ICM_BPC_TOOLTIP;Povolte pokud chcete, aby se kanál svítivosti vešel do výstupního barevného prostoru s pevným bílým bodem TP_ICM_DCPILLUMINANT;Osvětlení TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolované TP_ICM_DCPILLUMINANT_TOOLTIP;Vyberte které vložené DCP osvětlení se má použít. Ve výchozím stavu se použije "interpolované", což je mix mezi dvěma osvětleními založenými na vyvážení bílé. Nastavené je dostupné pouze v případě, že je povoleno dvojité DCP osvětlení s podporou interpolace. @@ -1531,6 +1578,7 @@ TP_ICM_INPUTPROFILE;Vstupní profil TP_ICM_LABEL;Správa barev TP_ICM_NOICM;Bez ICM: sRGB výstup TP_ICM_OUTPUTPROFILE;Výstupní barevný prostor +TP_ICM_PROFILEINTENT;Záměr reprodukce TP_ICM_SAVEREFERENCE;Uložit referenční obrázek pro profilování TP_ICM_SAVEREFERENCE_APPLYWB;Aplikovat vyvážení bílé TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Obecně se vyvážení bílé aplikuje při ukládání obrázku pro vytvoření ICC profilů a neaplikuje při vytváření DCP profilů. @@ -1584,6 +1632,7 @@ TP_LENSPROFILE_LABEL;Korekční profil objektivu TP_LENSPROFILE_USECA;Korekce chromatické aberace TP_LENSPROFILE_USEDIST;Korekce zkreslení TP_LENSPROFILE_USEVIGN;Korekce vinětace +TP_NEUTRAL;Obnovit TP_NEUTRAL_TIP;Nastaví posuvníky expozice na neutrální hodnoty,\nPoužije stejné kontroly jako volba "Automatické úrovně" bez ohledu na to, zda jsou nebo nejsou Automatické úrovně použity. TP_PCVIGNETTE_FEATHER;Rozptyl TP_PCVIGNETTE_FEATHER_TOOLTIP;Rozptyl:\n0 = pouze rohy,\n50 = napůl do středu,\n100 = do středu. @@ -1610,6 +1659,7 @@ TP_PRSHARPENING_TOOLTIP;Obrázek po zmenšení doostří. Funguje pouze pokud je TP_RAWCACORR_AUTO;Automatická korekce TP_RAWCACORR_CABLUE;Modrá TP_RAWCACORR_CARED;Červená +TP_RAWCACORR_CASTR;Síla TP_RAWEXPOS_BLACKS;Úrovně černé TP_RAWEXPOS_BLACK_0;Zelená 1 (řídící) TP_RAWEXPOS_BLACK_1;Červená @@ -1654,51 +1704,83 @@ TP_RESIZE_WIDTH;Šířka TP_RETINEX_CONTEDIT_HSL;HSV korekce histogramu TP_RETINEX_CONTEDIT_LAB;Histogram korekce L*a*b* TP_RETINEX_CONTEDIT_LH;Korekce odstínu +TP_RETINEX_CONTEDIT_MAP;Korekce masky TP_RETINEX_CURVEEDITOR_CD;L=f(L) TP_RETINEX_CURVEEDITOR_CD_TOOLTIP;Jas dle jasu L=f(L).\nUpraví raw data pro snížení výskytu halo efektu a vzniku artefaktů. TP_RETINEX_CURVEEDITOR_LH;Síla=f(O) TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Síla dle odstínu Síla=f(O)\nPokud je použita retinex metoda "světla" působí tato křivka také na barevnost. +TP_RETINEX_CURVEEDITOR_MAP;L=f(L) +TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;Tato křivka může být aplikována samostatně, nebo spolu s Gaussovou nebo vlnkovou maskou.\nPozor na artefakty! +TP_RETINEX_EQUAL;Korekce TP_RETINEX_FREEGAMMA;Volná gama TP_RETINEX_GAIN;Zisk +TP_RETINEX_GAINOFFS;Zisk a posun (jasu) +TP_RETINEX_GAINTRANSMISSION;Přenos zisku +TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Zesílí nebo zeslabí mapu přenosu pro dosažení jasu.\nÚsečka: přenos -min od 0. průměr. a hodnot (max).\nPořadnice: zisk. TP_RETINEX_GAIN_TOOLTIP;Působí na obnovený obrázek.\n\nToto je velmi odlišné od ostatních nastavení. Použito pro černé nebo bílé pixely a pro vyvážení histogramu. TP_RETINEX_GAMMA;Gama TP_RETINEX_GAMMA_FREE;Volná TP_RETINEX_GAMMA_HIGH;Vysoká TP_RETINEX_GAMMA_LOW;Nízká TP_RETINEX_GAMMA_MID;Střední -TP_RETINEX_GAMMA_NONE;Nic +TP_RETINEX_GAMMA_NONE;Žádná TP_RETINEX_GAMMA_TOOLTIP;Obnoví tóny aplikováním gamy před a po Retinex. To je odlišné od Retinex křivek nebo ostatních křivek (Lab, Expozice, atd.) +TP_RETINEX_GRAD;Přenos gradientu +TP_RETINEX_GRADS;Gradient síly +TP_RETINEX_GRADS_TOOLTIP;Pokud je posuvník na nule jsou všechny průchody stejné,\nPokud je větší než nula, tak je Síla s přibývajícími průběhy omezována. A obráceně. +TP_RETINEX_GRAD_TOOLTIP;Pokud je posuvník na nule jsou všechny průchody stejné,\nPokud je větší než nula, tak jsou Odchylka a Práh s přibývajícími průběhy omezovány. A obráceně. TP_RETINEX_HIGH;Silné TP_RETINEX_HIGHLIG;Světla TP_RETINEX_HIGHLIGHT;Práh světel TP_RETINEX_HIGHLIGHT_TOOLTIP;Zvýší působení algoritmu Silné.\nMůže vyžadovat nové přizpůsobení "Sousedních pixelů" a zvýšení "Korekce bílého bodu" v kartě Raw -> Raw bílé body. TP_RETINEX_HSLSPACE_LIN;HSV - Lineární TP_RETINEX_HSLSPACE_LOG;HSV - Logaritmická +TP_RETINEX_ITER;Průchody (Mapování tónů) +TP_RETINEX_ITERF;Mapování tónů +TP_RETINEX_ITER_TOOLTIP;Simuluje operátor Mapování tónů.\nVyšší hodnoty prodlužují čas zpracování. TP_RETINEX_LABEL;Retinex +TP_RETINEX_LABEL_MASK;Maska TP_RETINEX_LABSPACE;L*a*b* TP_RETINEX_LOW;Slabé +TP_RETINEX_MAP;Metoda masky +TP_RETINEX_MAP_GAUS;Gaussova maska +TP_RETINEX_MAP_MAPP;Ostrá maska (částečná vlnka) +TP_RETINEX_MAP_MAPT;Ostrá maska (kompletní vlnka) +TP_RETINEX_MAP_METHOD_TOOLTIP;Použít masku generovanou Gaussovou funkcí výše (poloměr, metoda) pro omezení halo efektu a artefaktů.\n\nPouze křivka: na masku je aplikována diagonální křivka kontrastu.\nPozor na artefakty!\n\nGaussova maska: originální maska je upravena Gaussovým rozostřením.\nRychlé.\n\nOstrá maska: na originální masku se použije vlnka.\nPomalé. +TP_RETINEX_MAP_NONE;Žádná TP_RETINEX_MEDIAN;Přenos filtru mediánu TP_RETINEX_METHOD;Metoda -TP_RETINEX_METHOD_TOOLTIP;Slabé = Posílí slabé světlo,\nJednolité = vyvážená akce,\nSilné = Posílí silné světlo,\nSvětla = Odstraní purpurovou ve světlech. +TP_RETINEX_METHOD_TOOLTIP;Slabé = Posílí slabé světlo,\nJednolité = Vyvážená akce,\nSilné = Posílí silné světlo,\nSvětla = Odstraní purpurovou ve světlech. TP_RETINEX_MLABEL;Obnovený bez závoje Min=%1 Max=%2 TP_RETINEX_MLABEL_TOOLTIP;Mělo by být poblíž min=0 max=32768\nObnovený obraz bez příměsí. -TP_RETINEX_NEIGHBOR;Sousední pixely +TP_RETINEX_NEIGHBOR;Poloměr TP_RETINEX_NEUTRAL;Obnovit TP_RETINEX_NEUTRAL_TIP;Obnoví původní hodnoty u všech posuvníků a křivek. -TP_RETINEX_OFFSET;Posun +TP_RETINEX_OFFSET;Posun (jasu) +TP_RETINEX_SCALES;Gaussův gradient +TP_RETINEX_SCALES_TOOLTIP;Pokud je posuvník na nule jsou všechny průchody stejné,\nPokud je větší než nula, tak jsou Rozsah a Průměr s přibývajícími průběhy omezovány. A obráceně. TP_RETINEX_SETTINGS;Nastavení +TP_RETINEX_SKAL;Měřítko TP_RETINEX_SLOPE;Sklon volné gamy TP_RETINEX_STRENGTH;Síla TP_RETINEX_THRESHOLD;Práh TP_RETINEX_THRESHOLD_TOOLTIP;Omezuje Vstup/Výstup.\nVstup = zdroj obrázku,\nVýstup = gauss obrázku. TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Průměr=%3 Sigma=%4 TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 -TP_RETINEX_TLABEL_TOOLTIP;Výsledek Mapy přenosu .\nMin a Max jsou použity Odchylkou.\nPrůměr a Sigma\nTm=Min TM=Max Mapy přenosu. +TP_RETINEX_TLABEL_TOOLTIP;Výsledek Mapy přenosu .\nMin a Max jsou použity Odchylkou.\nPrůměr a Sigma\nTm=Min TM=Max mapy přenosu. +TP_RETINEX_TRANF;Přenos TP_RETINEX_TRANSMISSION;Mapa přenosu TP_RETINEX_TRANSMISSION_TOOLTIP;Přenos podle přenosu.\nÚsečka: přenos z negativních hodnot (min), průměru a kladných hodnot (max).\nPořadnice: zesílení nebo zeslabení. TP_RETINEX_UNIFORM;Jednolité -TP_RETINEX_VARIANCE;Odchylka +TP_RETINEX_VARIANCE;Kontrast TP_RETINEX_VARIANCE_TOOLTIP;Nízká odchylka zvyšuje místní kontrast a nasycení, ale může vést ke vzniku artefaktů. +TP_RETINEX_VIEW;Zpracování +TP_RETINEX_VIEW_MASK;Maska +TP_RETINEX_VIEW_METHOD_TOOLTIP;Běžné - běžné zobrazení.\nMaska - zobrazí masku.\nNeostrá maska - zobrazí obrázek s neostrou maskou s velkým poloměrem.\nPřenos - Auto/Pevný - zobrazí soubor mapy přenosu před jakoukoli úpravou kontrastu a jasu.\n\nUpozornění: maska neodpovídá realitě. Je zesílena, aby byla lépe vidět. +TP_RETINEX_VIEW_NONE;Běžné +TP_RETINEX_VIEW_TRAN;Přenos - Automatický +TP_RETINEX_VIEW_TRAN2;Přenos - Pevný +TP_RETINEX_VIEW_UNSHARP;Maskování rozostření TP_RGBCURVES_BLUE;B TP_RGBCURVES_CHANNEL;Kanál TP_RGBCURVES_GREEN;G @@ -1725,7 +1807,7 @@ TP_SHARPENEDGE_THREE;Pouze jas TP_SHARPENING_AMOUNT;Míra TP_SHARPENING_EDRADIUS;Poloměr TP_SHARPENING_EDTOLERANCE;Tolerance k hranám -TP_SHARPENING_HALOCONTROL;Omezení haló artefatů +TP_SHARPENING_HALOCONTROL;Omezení halo efektu TP_SHARPENING_HCAMOUNT;Míra TP_SHARPENING_LABEL;Doostření TP_SHARPENING_METHOD;Metoda @@ -1983,83 +2065,3 @@ ZOOMPANEL_ZOOMFITSCREEN;Přizpůsobit obrázek obrazovce\nZkratka: f ZOOMPANEL_ZOOMIN;Přiblížit\nZkratka: + ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - -!!!!!!!!!!!!!!!!!!!!!!!!! -! Untranslated keys follow; remove the ! prefix after an entry is translated. -!!!!!!!!!!!!!!!!!!!!!!!!! - -!FILEBROWSER_SHOWORIGINALHINT;Show only original images.\n\nWhen several images exist with the same filename but different extensions, the one considered original is the one whose extension is nearest the top of the parsed extensions list in Preferences > File Browser > Parsed Extensions. -!GENERAL_APPLY;Apply -!GENERAL_OPEN;Open -!HISTORY_MSG_166;Exposure - Reset -!HISTORY_MSG_427;Output rendering intent -!HISTORY_MSG_428;Monitor rendering intent -!HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient -!HISTORY_MSG_432;Retinex - M - Highlights -!HISTORY_MSG_433;Retinex - M - Highlights TW -!HISTORY_MSG_434;Retinex - M - Shadows -!HISTORY_MSG_435;Retinex - M - Shadows TW -!HISTORY_MSG_436;Retinex - M - Radius -!HISTORY_MSG_437;Retinex - M - Method -!HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Process -!HISTORY_MSG_440;CbDL - Method -!HISTORY_MSG_441;Retinex - Gain transmission -!HISTORY_MSG_442;Retinex - Scale -!MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor -!MONITOR_PROFILE_SYSTEM;System default -!PARTIALPASTE_PRSHARPENING;Post-resize sharpening -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile -!PREFERENCES_PARSEDEXTDOWNHINT;Move selected extension down in the list. -!PREFERENCES_PARSEDEXTUPHINT;Move selected extension up in the list. -!PREFERENCES_PROFILE_NONE;None -!TP_CBDL_AFT;After Black-and-White -!TP_CBDL_BEF;Before Black-and-White -!TP_CBDL_METHOD;Process located -!TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. -!TP_DIRPYRDENOISE_3X3;3×3 -!TP_DIRPYRDENOISE_3X3_SOFT;3×3 soft -!TP_DIRPYRDENOISE_5X5;5×5 -!TP_DIRPYRDENOISE_5X5_SOFT;5×5 soft -!TP_DIRPYRDENOISE_7X7;7×7 -!TP_DIRPYRDENOISE_9X9;9×9 -!TP_DIRPYRDENOISE_MET_TOOLTIP;Apply a median filter of the desired window size. The larger the window's size, the longer it takes.\n\n3×3 soft: treats 5 pixels in a 3×3 pixel window.\n3×3: treats 9 pixels in a 3×3 pixel window.\n5×5 soft: treats 13 pixels in a 5×5 pixel window.\n5×5: treats 25 pixels in a 5×5 pixel window.\n7×7: treats 49 pixels in a 7×7 pixel window.\n9×9: treats 81 pixels in a 9×9 pixel window.\n\nSometimes it is possible to achieve higher quality running several iterations with a smaller window size than one iteration with a larger one. -!TP_DIRPYRDENOISE_PASSES_TOOLTIP;Applying three median filter iterations with a 3×3 window size often leads to better results than using one median filter iteration with a 7×7 window size. -!TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now? -!TP_ICM_PROFILEINTENT;Rendering Intent -!TP_NEUTRAL;Reset -!TP_RAWCACORR_CASTR;Strength -!TP_RETINEX_CONTEDIT_MAP;Mask equalizer -!TP_RETINEX_CURVEEDITOR_MAP;L=f(L) -!TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! -!TP_RETINEX_EQUAL;Equalizer -!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) -!TP_RETINEX_GAINTRANSMISSION;Gain transmission -!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. -!TP_RETINEX_GRAD;Transmission gradient -!TP_RETINEX_GRADS;Strength gradient -!TP_RETINEX_GRADS_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Strength is reduced when iterations increase, and conversely. -!TP_RETINEX_GRAD_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Variance and Threshold are reduced when iterations increase, and conversely. -!TP_RETINEX_ITER;Iterations (Tone-mapping) -!TP_RETINEX_ITERF;Tone mapping -!TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. -!TP_RETINEX_LABEL_MASK;Mask -!TP_RETINEX_MAP;Mask method -!TP_RETINEX_MAP_GAUS;Gaussian mask -!TP_RETINEX_MAP_MAPP;Sharp mask (wavelet partial) -!TP_RETINEX_MAP_MAPT;Sharp mask (wavelet total) -!TP_RETINEX_MAP_METHOD_TOOLTIP;Use the mask generated by the Gaussian function above (Radius, Method) to reduce halos and artifacts.\n\nCurve only: apply a diagonal contrast curve on the mask.\nBeware of artifacts!\n\nGaussian mask: generate and use a Gaussian blur of the original mask.\nQuick.\n\nSharp mask: generate and use a wavelet on the original mask.\nSlow. -!TP_RETINEX_MAP_NONE;None -!TP_RETINEX_SCALES;Gaussian gradient -!TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. -!TP_RETINEX_SKAL;Scale -!TP_RETINEX_TRANF;Transmission -!TP_RETINEX_VIEW;Process -!TP_RETINEX_VIEW_MASK;Mask -!TP_RETINEX_VIEW_METHOD_TOOLTIP;Standard - Normal display.\nMask - Displays the mask.\nUnsharp mask - Displays the image with a high radius unsharp mask.\nTransmission - Auto/Fixed - Displays the file transmission-map, before any action on contrast and brightness.\n\nAttention: the mask does not correspond to reality, but is amplified to make it more visible. -!TP_RETINEX_VIEW_NONE;Standard -!TP_RETINEX_VIEW_TRAN;Transmission - Auto -!TP_RETINEX_VIEW_TRAN2;Transmission - Fixed -!TP_RETINEX_VIEW_UNSHARP;Unsharp mask diff --git a/rtdata/languages/Dansk b/rtdata/languages/Dansk index 67ab884c8..43f10eacd 100644 --- a/rtdata/languages/Dansk +++ b/rtdata/languages/Dansk @@ -954,6 +954,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1122,7 +1123,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1158,6 +1159,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1181,7 +1183,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1238,6 +1241,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1245,6 +1250,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1451,7 +1457,6 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Can be used on raw and non-raw images.\n\nFor non-raw images noise reduction of luminance depends on the gamma of the input color profile. An sRGB gamma is assumed, thus if the image uses an input color profile of a different gamma, the effects of luminance noise reduction will differ. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1466,13 +1471,11 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. @@ -1582,6 +1585,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. @@ -1798,7 +1803,6 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index 9c7478cf7..8d1c44b60 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -1402,7 +1402,6 @@ TP_DIRPYRDENOISE_CUR;Kurve TP_DIRPYRDENOISE_CURVEEDITOR_CC;Farbe TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Erhöht den Wert aller Chrominanz-Regler und regelt die Chrominanz-Rauschreduzierung als Funktion der Chromatizität. Die Intensität kann über Kontrollpunkte für schwach bis intensiv gesättigte Farben unterschiedlich eingestellt werden. TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Moduliert die Wirkung der Luminanz-Rauschreduzierung -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Kann für RAW und Nicht-RAW-Bilder verwendet werden.\n\nBei Nicht-Raw-Bildern hängt die Rauschreduzierung der Luminanz vom Gamma des Eingangsfarbprofils ab. Es wird ein sRGB-Gamma angenommen, daher wird die Luminanz-Rauschreduzierung variieren, wenn das Eingangsbild ein Farbprofil mit anderem Gamma verwendet. TP_DIRPYRDENOISE_ENH;Erweiterter Modus TP_DIRPYRDENOISE_ENH_TOOLTIP;Erhöht die Qualität der Rauschreduzierung auf Kosten einer um 20% erhöhten Verarbeitungszeit. TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1417,13 +1416,11 @@ TP_DIRPYRDENOISE_LPLABM;Gewichtet L* (wenig) + a*b* (normal) TP_DIRPYRDENOISE_LTYPE;Luminanzkontrolle TP_DIRPYRDENOISE_LUMA;Luminanz TP_DIRPYRDENOISE_LUMAFR;Luminanz -TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet mit Luminanz- und Fourierumwandlung für Luminanzdetails. TP_DIRPYRDENOISE_MAN;Benutzerdefiniert TP_DIRPYRDENOISE_MANU;Benutzerdefiniert TP_DIRPYRDENOISE_MED;Medianfilter TP_DIRPYRDENOISE_MEDMETHOD;Medianmethode TP_DIRPYRDENOISE_MEDTYPE;Mediantyp -TP_DIRPYRDENOISE_MED_TOOLTIP;Medianrauschreduzierung einschalten TP_DIRPYRDENOISE_METHOD;Methode TP_DIRPYRDENOISE_METHOD11;Qualität TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Einstellung der Qualität der Rauschreduzierung. Die Einstellung “Hoch“ verbessert die Rauschreduzierung auf Kosten der Verarbeitungszeit. @@ -2054,3 +2051,15 @@ ZOOMPANEL_ZOOMFITSCREEN;An Bildschirm anpassen\nTaste: f ZOOMPANEL_ZOOMIN;Hineinzoomen\nTaste: + ZOOMPANEL_ZOOMOUT;Herauszoomen\nTaste: - +!!!!!!!!!!!!!!!!!!!!!!!!! +! Untranslated keys follow; remove the ! prefix after an entry is translated. +!!!!!!!!!!!!!!!!!!!!!!!!! + +!HISTORY_MSG_443;Output Black Point Compensation +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point diff --git a/rtdata/languages/English (UK) b/rtdata/languages/English (UK) index f960286c8..083b4247e 100644 --- a/rtdata/languages/English (UK) +++ b/rtdata/languages/English (UK) @@ -37,7 +37,10 @@ PREFERENCES_INTENT_ABSOLUTE;Absolute Colourimetric PREFERENCES_INTENT_RELATIVE;Relative Colourimetric PREFERENCES_MENUGROUPLABEL;Group "Colour label" PREFERENCES_NAVGUIDEBRUSH;Navigator guide colour +PREFERENCES_SELECTFONT_COLPICKER;Select Colour Picker's font PREFERENCES_TAB_COLORMGR;Colour Management +SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colours from the output profile. +TOOLBAR_TOOLTIP_COLORPICKER;Lockable Colour Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a colour picker\nDrag it around while pressing the left mouse button\nDelete the colour picker with a right mouse button click\nDelete all colour pickers with Shift + Right mouse button click\nRight click away from any colour picker to go back to the Hand tool TOOLBAR_TOOLTIP_STRAIGHTEN;Straighten / fine rotation.\nShortcut: s\n\nIndicate the vertical or horizontal by drawing a guide line over the image preview. Angle of rotation will be shown next to the guide line. Centre of rotation is the geometrical centre of the image. TP_BWMIX_CC_ENABLED;Adjust complementary colour TP_BWMIX_CC_TOOLTIP;Enable to allow automatic adjustment of complementary colours in ROYGCBPM mode. @@ -65,7 +68,6 @@ TP_COLORTONING_SPLITLR;Saturation 2 colours TP_COLORTONING_TWO2;Special chroma '2 colours' TP_COLORTONING_TWOCOLOR_TOOLTIP;Standard chroma:\nLinear response, a* = b*.\n\nSpecial chroma:\nLinear response, a* = b*, but unbound - try under the diagonal.\n\nSpecial a* and b*:\nLinear response unbound with separate curves for a* and b*. Intended for special effects.\n\nSpecial chroma 2 colours:\nMore predictable. TP_DIRPYRDENOISE_CTYPE_TOOLTIP;Manual\nActs on the full image.\nYou control the noise reduction settings manually.\n\nAutomatic global\nActs on the full image.\n9 zones are used to calculate a global chrominance noise reduction setting.\n\nAutomatic multi-zones\nNo preview - works only during saving, but using the "Preview" method by matching the tile size and centre to the preview size and centre you can get an idea of the expected results.\nThe image is divided into tiles (about 10 to 70 depending on image size) and each tile receives its own chrominance noise reduction settings.\n\nPreview\nActs on the whole image.\nThe part of the image visible in the preview is used to calculate global chrominance noise reduction settings. -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Can be used on raw and non-raw images.\n\nFor non-raw images noise reduction of luminance depends on the gamma of the input colour profile. An sRGB gamma is assumed, thus if the image uses an input colour profile of a different gamma, the effects of luminance noise reduction will differ. TP_DIRPYRDENOISE_PREVLABEL;Preview size=%1, Centre: Px=%2 Py=%3 TP_DIRPYRDENOISE_TILELABEL;Tile size=%1, Centre: Tx=%2 Ty=%3 TP_DIRPYREQUALIZER_ALGO;Skin Colour Range @@ -77,6 +79,7 @@ TP_GRADIENT_CENTER;Centre TP_GRADIENT_CENTER_X;Centre X TP_GRADIENT_CENTER_Y;Centre Y TP_HLREC_COLOR;Colour Propagation +TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output colour space with a fix White Point TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input colour profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple colour matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. TP_ICM_INPUTCUSTOM_TOOLTIP;Select your own DCP/ICC colour profile file for the camera. @@ -752,6 +755,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT;Add !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !HISTORY_SNAPSHOT;Snapshot @@ -1023,7 +1027,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_FLUOF11;Fluorescent F11 !PREFERENCES_FORIMAGE;For non-raw photos !PREFERENCES_FORRAW;For raw photos -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GIMPPATH;GIMP installation directory !PREFERENCES_GREY;Output device's Yb luminance (%) @@ -1063,6 +1067,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1101,7 +1106,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font !PREFERENCES_SELECTLANG;Select language !PREFERENCES_SELECTTHEME;Select theme !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings @@ -1196,6 +1201,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1422,13 +1428,11 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. @@ -1543,6 +1547,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. @@ -1789,7 +1794,6 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_SHARPENING_RLD_DAMPING;Damping !TP_SHARPENING_RLD_ITERATIONS;Iterations !TP_SHARPENING_THRESHOLD;Threshold -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENING_USM;Unsharp Mask !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US) index f38615acd..de97d7721 100644 --- a/rtdata/languages/English (US) +++ b/rtdata/languages/English (US) @@ -675,6 +675,7 @@ !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT;Add !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !HISTORY_SNAPSHOT;Snapshot @@ -957,7 +958,7 @@ !PREFERENCES_FLUOF11;Fluorescent F11 !PREFERENCES_FORIMAGE;For non-raw photos !PREFERENCES_FORRAW;For raw photos -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GIMPPATH;GIMP installation directory !PREFERENCES_GREY;Output device's Yb luminance (%) @@ -1001,6 +1002,7 @@ !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1040,7 +1042,8 @@ !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SELECTLANG;Select language !PREFERENCES_SELECTTHEME;Select theme !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings @@ -1136,6 +1139,8 @@ !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1143,6 +1148,7 @@ !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TOOLBAR_TOOLTIP_CROP;Crop selection.\nShortcut: c\nMove the crop area using Shift-mouse drag !TOOLBAR_TOOLTIP_HAND;Hand tool.\nShortcut: h !TOOLBAR_TOOLTIP_STRAIGHTEN;Straighten / fine rotation.\nShortcut: s\n\nIndicate the vertical or horizontal by drawing a guide line over the image preview. Angle of rotation will be shown next to the guide line. Center of rotation is the geometrical center of the image. @@ -1375,7 +1381,6 @@ !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Can be used on raw and non-raw images.\n\nFor non-raw images noise reduction of luminance depends on the gamma of the input color profile. An sRGB gamma is assumed, thus if the image uses an input color profile of a different gamma, the effects of luminance noise reduction will differ. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1390,13 +1395,11 @@ !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. @@ -1522,6 +1525,8 @@ !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. @@ -1780,7 +1785,6 @@ !TP_SHARPENING_RLD_DAMPING;Damping !TP_SHARPENING_RLD_ITERATIONS;Iterations !TP_SHARPENING_THRESHOLD;Threshold -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENING_USM;Unsharp Mask !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast diff --git a/rtdata/languages/Espanol b/rtdata/languages/Espanol index fc06babc8..54a2fde5b 100644 --- a/rtdata/languages/Espanol +++ b/rtdata/languages/Espanol @@ -1165,7 +1165,6 @@ TP_DEFRINGE_THRESHOLD;Umbral TP_DIRPYRDENOISE_BLUE;Crominancia: Azul-Amarillo TP_DIRPYRDENOISE_CHROMA;Crominancia: Maestra TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modula la acción de eliminación de ruido 'de luminancia' -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Puede usarse en imágenes Raw y no Raw.\n\nPara imágenes no Raw la reducción del ruido en la luminancia depende de la gamma en el perfil de color de entrada. Se asume la gamma de sRGB, de manera que si la imagen tiene un perfil de color con otra gamma, la reducción del ruido en la luminancia va a variar. TP_DIRPYRDENOISE_ENH;Modo mejorado TP_DIRPYRDENOISE_ENH_TOOLTIP;Incrementa la calidad de la Reducción de Ruido a costa de un incremento de 20% en el tiempo de procesamiento TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1179,7 +1178,6 @@ TP_DIRPYRDENOISE_LUMA;Luminancia TP_DIRPYRDENOISE_MED;Median TP_DIRPYRDENOISE_MEDMETHOD;Método Median TP_DIRPYRDENOISE_MEDTYPE;Tipo Median -TP_DIRPYRDENOISE_MED_TOOLTIP;Eliminador de ruido Median activado TP_DIRPYRDENOISE_METHOD;Método TP_DIRPYRDENOISE_METHOD11;Calidad TP_DIRPYRDENOISE_METHOD11_TOOLTIP;La Calidad puede ser adaptada a un patrón de ruido. Al seleccionar "Alto" se incrementa el efecto de reducción de ruido a costa de prolongar el tiempo de procesamiento. @@ -1702,6 +1700,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet !MAIN_TAB_WAVELET_TOOLTIP;Shortcut: Alt-w @@ -1737,7 +1736,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 @@ -1753,6 +1752,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_NAVIGATIONFRAME;Navigation @@ -1767,6 +1767,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_PROFILE_NONE;None !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1783,6 +1784,9 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_CBDL_AFT;After Black-and-White !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located @@ -1812,7 +1816,6 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MET_TOOLTIP;Apply a median filter of the desired window size. The larger the window's size, the longer it takes.\n\n3×3 soft: treats 5 pixels in a 3×3 pixel window.\n3×3: treats 9 pixels in a 3×3 pixel window.\n5×5 soft: treats 13 pixels in a 5×5 pixel window.\n5×5: treats 25 pixels in a 5×5 pixel window.\n7×7: treats 49 pixels in a 7×7 pixel window.\n9×9: treats 81 pixels in a 9×9 pixel window.\n\nSometimes it is possible to achieve higher quality running several iterations with a smaller window size than one iteration with a larger one. @@ -1837,6 +1840,8 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. diff --git a/rtdata/languages/Euskara b/rtdata/languages/Euskara index 1d4df36ae..7ebb655f5 100644 --- a/rtdata/languages/Euskara +++ b/rtdata/languages/Euskara @@ -954,6 +954,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1122,7 +1123,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1158,6 +1159,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1181,7 +1183,8 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1238,6 +1241,8 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1245,6 +1250,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1451,7 +1457,6 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Can be used on raw and non-raw images.\n\nFor non-raw images noise reduction of luminance depends on the gamma of the input color profile. An sRGB gamma is assumed, thus if the image uses an input color profile of a different gamma, the effects of luminance noise reduction will differ. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1466,13 +1471,11 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. @@ -1582,6 +1585,8 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. @@ -1798,7 +1803,6 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index fa622202c..fe7b73832 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -632,7 +632,8 @@ HISTORY_MSG_403;O - NB - Sensibilité des bords HISTORY_MSG_404;O - NB - Base amplification HISTORY_MSG_405;O - Débruitage - Niveau 4 HISTORY_MSG_406;O - NB - Pixels voisins -HISTORY_MSG_407;Retrait de taches +HISTORY_MSG_443;Compensation du Point Noir de Sortie +HISTORY_MSG_444;Retrait de taches HISTORY_NEWSNAPSHOT;Ajouter HISTORY_NEWSNAPSHOT_TOOLTIP;Raccourci: Alt-s HISTORY_SNAPSHOT;Capture @@ -955,6 +956,7 @@ PREFERENCES_MENUGROUPRANK;Classement PREFERENCES_MENUOPTIONS;Options du menu PREFERENCES_METADATA;Metadonnées PREFERENCES_MIN;Mini (100x115) +PREFERENCES_MONBPC;Compensation du Point Noir pour la transformation L*a*b*->Moniteur PREFERENCES_MULTITAB;Éditeurs multiple PREFERENCES_MULTITABDUALMON;Éditeurs multiple, si possible sur un second moniteur PREFERENCES_NAVGUIDEBRUSH;Couleur du cadre dans le Navigateur @@ -989,7 +991,8 @@ PREFERENCES_REMEMBERZOOMPAN;Se souvenir de niveau de zoom et de la position de l PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Retient le niveau de zoom et la position de l'image courante lors de l'ouverture d'une nouvelle image.\n\nCette option ne fonctionne que dans le mode "Éditeur unique" et quand "Méthode de dématriçage utilisé pour l'aperçu à un zoom <100%" is set to "Idem PP3". PREFERENCES_RGBDTL_LABEL;Nombre maximum d'unités de calcul pour la Réduction du bruit PREFERENCES_RGBDTL_TOOLTIP;La réduction du bruit nécessite un minimum d'à peu près 128Mo de RAM pour une image de 10MPix ou 512Mo pour une image de 40MPix, ainsi que 128Mo de RAM supplémentaire par unité de calcul. Plus il y aura d'unités de calcul travaillant en parallèle, plus ce sera rapide. Laissez la valeur à "0" pour utiliser automatiquement autant d'unités de calcul que possible. -PREFERENCES_SELECTFONT;Police de caractère +PREFERENCES_SELECTFONT;Police générale +PREFERENCES_SELECTFONT_COLPICKER;Police des pipette à couleur PREFERENCES_SELECTLANG;Choix de la langue PREFERENCES_SELECTTHEME;Choisissez un thème PREFERENCES_SERIALIZE_TIFF_READ;Réglage de lecture des images TIFF @@ -1083,6 +1086,8 @@ SAVEDLG_SUBSAMP_3;Meilleure qualité SAVEDLG_TIFFUNCOMPRESSED;TIFF non compressé SAVEDLG_WARNFILENAME;Le fichier sera nommé SHCSELECTOR_TOOLTIP;Cliquez le bouton droit de la souris\npour réinitialiser la position de ces 3 curseurs +SOFTPROOF_GAMUTCHECK_TOOLTIP;Si activé, indique en gris les pixels dont la couleurs est en dehors du gamut du profile de sortie +SOFTPROOF_TOOLTIP;Épreuvage écran\nSi activé, simule le rendu généré par le profiles de sortie de l'outil ICM. Particulièrement utile pour simuler le rendu en sortie d'imprimante. THRESHOLDSELECTOR_B;Bas THRESHOLDSELECTOR_BL;Bas-gauche THRESHOLDSELECTOR_BR;Bas-droite @@ -1090,6 +1095,7 @@ THRESHOLDSELECTOR_HINT;Maintenez la touche Shift appuyée pour déplacer THRESHOLDSELECTOR_T;Haut THRESHOLDSELECTOR_TL;Haut-Gauche THRESHOLDSELECTOR_TR;Haut-droite +TOOLBAR_TOOLTIP_COLORPICKER;Ancre de Vérification Couleur\n\nLorque activé:\nCliquez la zone d'image avec le bouton gauche de la souris pour ajouter une ancre\nDéplacez-le en le "tirant" avec le bouton gauche de la souris\nSupprimez une ancre en cliquant dessus avec le bouton droit de la souris\nSupprimez toutes les ancres avec Shift + click avec le bouton droit\nCliquez avec le bouton droit de la souris en dehors de toute ancre pour revenir au mode Déplacement TOOLBAR_TOOLTIP_CROP;Sélection du recadrage\nRaccourci: c\nDéplacez le recadrage en utilisant Shift + Glisser TOOLBAR_TOOLTIP_HAND;Outil de navigation\nRaccourci: h TOOLBAR_TOOLTIP_STRAIGHTEN;Sélection de la ligne d'horizon\nRaccourci: s\n\nIndiquez la verticale ou l'horizontale en dessinant une ligne à travers l'image de prévisualisation. L'angle de rotation sera affiché près de la ligne guide. Le centre de rotation est le centre géométrique de l'image. @@ -1311,7 +1317,6 @@ TP_DIRPYRDENOISE_CUR;Courbe TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Augmente (multiplie) la valeur de tousles curseurs de chrominance.\nCette courbe vous permet d'ajuster la force de la réduction de bruit chromatique en fonction de la chromaticité, par exemple pour augmenter l'action dans les zones peu saturées et pour la réduire dans ceux celles très saturées. TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Module l'action du débruitage de 'Luminance' -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Peut être utilisé sur les images raw et non-raw.\n\nPour les images non-raw, la réduction de bruit de luminance dépend du gamma du profil couleur d'entée. Un gamma sRGB est supposé, c'est pourquoi si l'image a un profil couleur d'un gamma différent, la réduction de bruit de luminance variera. TP_DIRPYRDENOISE_ENH;Mode amélioré TP_DIRPYRDENOISE_ENH_TOOLTIP;Augmente la qualité du débruitage, mais augmente le temps de traitement d'environ 20% TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1326,13 +1331,11 @@ TP_DIRPYRDENOISE_LPLABM;L* pondéré (faiblement) + a*b* (normal) TP_DIRPYRDENOISE_LTYPE;Contrôle de luminance TP_DIRPYRDENOISE_LUMA;Luminance TP_DIRPYRDENOISE_LUMAFR;Luminance -TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Ondelettes pour la luminance et transformé de Fourier pour les détails de luminance TP_DIRPYRDENOISE_MAN;Manuel TP_DIRPYRDENOISE_MANU;Manuel TP_DIRPYRDENOISE_MED;Filtre Médian TP_DIRPYRDENOISE_MEDMETHOD;Méthode TP_DIRPYRDENOISE_MEDTYPE;Type de médiane -TP_DIRPYRDENOISE_MED_TOOLTIP;Active le débruitage médian TP_DIRPYRDENOISE_METHOD;Méthode TP_DIRPYRDENOISE_METHOD11;Qualité TP_DIRPYRDENOISE_METHOD11_TOOLTIP;La qualité peut être adapté à la trame du bruit. Régler sur "haut" augmentera l'effet de la réduction de bruit au prix d'un temps de traitement plus long. @@ -1455,6 +1458,8 @@ TP_ICM_APPLYLOOKTABLE;Table de recherche TP_ICM_APPLYLOOKTABLE_TOOLTIP;Utilise la table de recherche (LUT) contenu dans le profil DCP. Ce réglage n'est possible que si le profil DCP sélectionné en contient une. TP_ICM_BLENDCMSMATRIX;Mélange des hautes lumières\ndu profil ICC avec la matrice TP_ICM_BLENDCMSMATRIX_TOOLTIP;Activer la récupération des zones brûlées lorsque les profils ICC basés sur la LUT sont utilisés +TP_ICM_BPC;Compensation du Point Noir +TP_ICM_BPC_TOOLTIP;Activez ceci pour faire correspondre le canal Luminosité à l'espace couleur de sortie avec un Point Blanc fixe TP_ICM_DCPILLUMINANT;Illuminant TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolé TP_ICM_DCPILLUMINANT_TOOLTIP;Sélectionne quel illuminant DCP inclus utiliser. La valeur par défaut est "Interpolé", qui est un mix entre les 2 profils inclus basé sur la Balance des Blancs choisie. Ce paramètre n'est actif que si un fichier DCP Bi-Illuminant avec support de l'interpolation est choisi. diff --git a/rtdata/languages/Greek b/rtdata/languages/Greek index 13d87c84c..4cb598b53 100644 --- a/rtdata/languages/Greek +++ b/rtdata/languages/Greek @@ -953,6 +953,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1121,7 +1122,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1157,6 +1158,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1180,7 +1182,8 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1237,6 +1240,8 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1244,6 +1249,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1450,7 +1456,6 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Can be used on raw and non-raw images.\n\nFor non-raw images noise reduction of luminance depends on the gamma of the input color profile. An sRGB gamma is assumed, thus if the image uses an input color profile of a different gamma, the effects of luminance noise reduction will differ. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1465,13 +1470,11 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. @@ -1581,6 +1584,8 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. @@ -1797,7 +1802,6 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/Hebrew b/rtdata/languages/Hebrew index f91ac1f95..89e7c0eae 100644 --- a/rtdata/languages/Hebrew +++ b/rtdata/languages/Hebrew @@ -954,6 +954,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1122,7 +1123,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1158,6 +1159,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1181,7 +1183,8 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1238,6 +1241,8 @@ TP_WBALANCE_TEMPERATURE;מידת חום !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1245,6 +1250,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1451,7 +1457,6 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Can be used on raw and non-raw images.\n\nFor non-raw images noise reduction of luminance depends on the gamma of the input color profile. An sRGB gamma is assumed, thus if the image uses an input color profile of a different gamma, the effects of luminance noise reduction will differ. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1466,13 +1471,11 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. @@ -1582,6 +1585,8 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. @@ -1798,7 +1803,6 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/Italiano b/rtdata/languages/Italiano index eabb2ff60..70739f62d 100644 --- a/rtdata/languages/Italiano +++ b/rtdata/languages/Italiano @@ -1029,7 +1029,6 @@ TP_DEFRINGE_RADIUS;Raggio TP_DEFRINGE_THRESHOLD;Soglia TP_DIRPYRDENOISE_BLUE;Crominanza - Blu-Giallo TP_DIRPYRDENOISE_CHROMA;Crominanza (Principale) -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Utilizzabile su immagini raw e non raw.\n\nPer immagini non raw, la riduzione rumore di luminanza dipende dal gamma del profilo colore di ingresso. Si presume un gamma sRGB, quindi se l'immagine di ingresso ha un profilo colore di un gamma diverso, la riduzione rumore di luminanza cambierà. TP_DIRPYRDENOISE_ENH;Modalità Migliorata TP_DIRPYRDENOISE_ENH_TOOLTIP;Aumenta la qualità della riduzione rumore al costo di un incremento del 20% del tempo di elaborazione. TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1574,6 +1573,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet @@ -1607,7 +1607,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 @@ -1623,6 +1623,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_NAVIGATIONFRAME;Navigation @@ -1637,6 +1638,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_PROFILE_NONE;None !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1653,6 +1655,9 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_CBDL_AFT;After Black-and-White !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located @@ -1721,13 +1726,11 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. !TP_DIRPYRDENOISE_METM_TOOLTIP;When using the "Luminance only" and "L*a*b*" methods, median filtering will be performed just after the wavelet step in the noise reduction pipeline.\nWhen using the "RGB" mode, it will be performed at the very end of the noise reduction pipeline. @@ -1764,6 +1767,8 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. diff --git a/rtdata/languages/Japanese b/rtdata/languages/Japanese index 34211dbb3..b13b2bd81 100644 --- a/rtdata/languages/Japanese +++ b/rtdata/languages/Japanese @@ -1344,7 +1344,6 @@ TP_DIRPYRDENOISE_CUR;カーブ TP_DIRPYRDENOISE_CURVEEDITOR_CC;色度 TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;色度のスライダーの値を全て増やします(乗数)\nこれは色度に応じて色ノイズの低減効果の強弱を調節するカーブです。例えば、色度の低い部分で低減効果を高めるとか、色度の高い部分で低減効果を緩める、という具合です。 TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;‘輝度’の位置でノイズ低減の強さを加減します -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;rawと非raw画像に使用することができます\n\n非raw画像の場合、輝度ノイズ低減は、入力カラープロファイルのガンマを使って行います。その際sRGBのガンマが想定されていますので、入力画像が異なるガンマのカラープロファイルであれば、輝度ノイズ低減の結果も異なります。 TP_DIRPYRDENOISE_ENH;強化モード TP_DIRPYRDENOISE_ENH_TOOLTIP;ノイズ低減の効果を髙めますが、代わりに演算時間が約20%増えます。 TP_DIRPYRDENOISE_GAMMA;ガンマ @@ -1359,13 +1358,11 @@ TP_DIRPYRDENOISE_LPLABM;加重平均 L* (少なめ) + a*b* (普通) TP_DIRPYRDENOISE_LTYPE;輝度ノイズの調整法 TP_DIRPYRDENOISE_LUMA;輝度 TP_DIRPYRDENOISE_LUMAFR;輝度ノイズ -TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;輝度の低減で、全体的にはウェーブレット変換、ディテールにはフーリエ変換を使います TP_DIRPYRDENOISE_MAN;手動 TP_DIRPYRDENOISE_MANU;手動 TP_DIRPYRDENOISE_MED;メディアンフィルター TP_DIRPYRDENOISE_MEDMETHOD;方式 TP_DIRPYRDENOISE_MEDTYPE;フィルターの種類 -TP_DIRPYRDENOISE_MED_TOOLTIP;メディアンフィルターによるノイズ低減を有効にします TP_DIRPYRDENOISE_METHOD;方式 TP_DIRPYRDENOISE_METHOD11;ノイズ低減の質 TP_DIRPYRDENOISE_METHOD11_TOOLTIP;ノイズの状態に応じて低減効果の質を選べます:1-標準 2-高い\n2の方がノイズ低減効果は高くなりますが、その分処理時間が増えます。 @@ -1954,17 +1951,23 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MONITOR_PROFILE_SYSTEM;System default !PARTIALPASTE_PRSHARPENING;Post-resize sharpening !PARTIALPASTE_RETINEX;Retinex +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_PARSEDEXTDOWNHINT;Move selected extension down in the list. !PREFERENCES_PARSEDEXTUPHINT;Move selected extension up in the list. !PREFERENCES_PROFILE_NONE;None +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_CBDL_AFT;After Black-and-White !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located @@ -1978,6 +1981,8 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !TP_DIRPYRDENOISE_MET_TOOLTIP;Apply a median filter of the desired window size. The larger the window's size, the longer it takes.\n\n3×3 soft: treats 5 pixels in a 3×3 pixel window.\n3×3: treats 9 pixels in a 3×3 pixel window.\n5×5 soft: treats 13 pixels in a 5×5 pixel window.\n5×5: treats 25 pixels in a 5×5 pixel window.\n7×7: treats 49 pixels in a 7×7 pixel window.\n9×9: treats 81 pixels in a 9×9 pixel window.\n\nSometimes it is possible to achieve higher quality running several iterations with a smaller window size than one iteration with a larger one. !TP_DIRPYRDENOISE_PASSES_TOOLTIP;Applying three median filter iterations with a 3×3 window size often leads to better results than using one median filter iteration with a 7×7 window size. !TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now? +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_PROFILEINTENT;Rendering Intent !TP_NEUTRAL;Reset !TP_RAWCACORR_CASTR;Strength diff --git a/rtdata/languages/Latvian b/rtdata/languages/Latvian index 8e93725bb..a3022fab7 100644 --- a/rtdata/languages/Latvian +++ b/rtdata/languages/Latvian @@ -954,6 +954,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1122,7 +1123,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1158,6 +1159,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1181,7 +1183,8 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1238,6 +1241,8 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1245,6 +1250,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1451,7 +1457,6 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Can be used on raw and non-raw images.\n\nFor non-raw images noise reduction of luminance depends on the gamma of the input color profile. An sRGB gamma is assumed, thus if the image uses an input color profile of a different gamma, the effects of luminance noise reduction will differ. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1466,13 +1471,11 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. @@ -1582,6 +1585,8 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. @@ -1798,7 +1803,6 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/Magyar b/rtdata/languages/Magyar index dc4129b8f..c102d9423 100644 --- a/rtdata/languages/Magyar +++ b/rtdata/languages/Magyar @@ -1235,6 +1235,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -1316,7 +1317,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1343,6 +1344,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MENUGROUPEXTPROGS;Group "Open with" !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1360,6 +1362,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1393,6 +1396,8 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1400,6 +1405,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1596,7 +1602,6 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Can be used on raw and non-raw images.\n\nFor non-raw images noise reduction of luminance depends on the gamma of the input color profile. An sRGB gamma is assumed, thus if the image uses an input color profile of a different gamma, the effects of luminance noise reduction will differ. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA_TOOLTIP;Gamma varies noise reduction strength across the range of tones. Smaller values will target shadows, while larger values will stretch the effect to the brighter tones. @@ -1608,13 +1613,11 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. @@ -1686,6 +1689,8 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. @@ -1851,7 +1856,6 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_RGBCURVES_LUMAMODE_TOOLTIP;Luminosity mode allows to vary the contribution of R, G and B channels to the luminosity of the image, without altering image color. !TP_SAVEDIALOG_OK_TIP;Shortcut: Ctrl-Enter !TP_SHADOWSHLIGHTS_SHARPMASK;Sharp mask -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH !TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Skin-tones !TP_VIBRANCE_CURVEEDITOR_SKINTONES_RANGE1;Red/Purple diff --git a/rtdata/languages/Nederlands b/rtdata/languages/Nederlands index 54e0a68e1..bf47b01ad 100644 --- a/rtdata/languages/Nederlands +++ b/rtdata/languages/Nederlands @@ -1375,7 +1375,6 @@ TP_DIRPYRDENOISE_CUR;Curve TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Vergroot (vermenigvuldigt) de waarde van alle chrominantie schuifbalken.\nMet deze curve kun je de sterkte aanpassen van de chromatische ruisonderdrukking. Bijvoorbeeld door de werking te vergroten in gebieden met lage verzadiging en te verminderen in gebieden met hoge verzadiging. TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Luminantie ruisonderdrukking. Werkt niet lineair maar modulerend -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Kan worden gebruikt op raw en niet-raw afbeeldingen.\n\nVoor niet-raw afbeeldingen geldt dat ruisonderdrukking van de luminantie afhangt van het gamma van het invoerprofiel. Standaard wordt uitgegaan van het gamma van sRGB. Als de afbeelding dus een kleurprofiel heeft met een afwijkend gamma, zal de luminantie ruisonderdrukking verschillen. TP_DIRPYRDENOISE_ENH;Verbeteren TP_DIRPYRDENOISE_ENH_TOOLTIP;Verbetert de ruisonderdrukking, maar vergroot de verwerkingstijd met ongeveer 20% TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1390,13 +1389,11 @@ TP_DIRPYRDENOISE_LPLABM;Gewogen L* (weinig) + a*b* (normaal) TP_DIRPYRDENOISE_LTYPE;Type gereedschap TP_DIRPYRDENOISE_LUMA;Luminantie TP_DIRPYRDENOISE_LUMAFR;Luminantie -TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet voor Luminantie- en Fourier transformatie voor betere details bij luminantie TP_DIRPYRDENOISE_MAN;Handmatig TP_DIRPYRDENOISE_MANU;Handmatig TP_DIRPYRDENOISE_MED;Mediaan filter TP_DIRPYRDENOISE_MEDMETHOD;Methode TP_DIRPYRDENOISE_MEDTYPE;Type -TP_DIRPYRDENOISE_MED_TOOLTIP;Mediaan ruisonderdrukking TP_DIRPYRDENOISE_METHOD;Methode TP_DIRPYRDENOISE_METHOD11;Kwaliteit TP_DIRPYRDENOISE_METHOD11_TOOLTIP;De kwaliteit kan worden aangepast aan de hoeveelheid ruis. \nHoog verbetert de ruisonderdrukking, maar verlengt de verwerkingstijd @@ -2034,6 +2031,12 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - !HISTORY_MSG_439;Retinex - Process !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_AUTOCH;Auto !TP_DIRPYRDENOISE_3X3;3×3 !TP_DIRPYRDENOISE_3X3_SOFT;3×3 soft @@ -2043,6 +2046,8 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - !TP_DIRPYRDENOISE_9X9;9×9 !TP_DIRPYRDENOISE_MET_TOOLTIP;Apply a median filter of the desired window size. The larger the window's size, the longer it takes.\n\n3×3 soft: treats 5 pixels in a 3×3 pixel window.\n3×3: treats 9 pixels in a 3×3 pixel window.\n5×5 soft: treats 13 pixels in a 5×5 pixel window.\n5×5: treats 25 pixels in a 5×5 pixel window.\n7×7: treats 49 pixels in a 7×7 pixel window.\n9×9: treats 81 pixels in a 9×9 pixel window.\n\nSometimes it is possible to achieve higher quality running several iterations with a smaller window size than one iteration with a larger one. !TP_DIRPYRDENOISE_PASSES_TOOLTIP;Applying three median filter iterations with a 3×3 window size often leads to better results than using one median filter iteration with a 7×7 window size. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_RETINEX_GAINOFFS;Gain and Offset (brightness) !TP_RETINEX_GAINTRANSMISSION;Gain transmission !TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. diff --git a/rtdata/languages/Norsk BM b/rtdata/languages/Norsk BM index a3554ca16..6b2901927 100644 --- a/rtdata/languages/Norsk BM +++ b/rtdata/languages/Norsk BM @@ -953,6 +953,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1121,7 +1122,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1157,6 +1158,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1180,7 +1182,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1237,6 +1240,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1244,6 +1249,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1450,7 +1456,6 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Can be used on raw and non-raw images.\n\nFor non-raw images noise reduction of luminance depends on the gamma of the input color profile. An sRGB gamma is assumed, thus if the image uses an input color profile of a different gamma, the effects of luminance noise reduction will differ. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1465,13 +1470,11 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. @@ -1581,6 +1584,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. @@ -1797,7 +1802,6 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish index 584409e96..0b3bbe5f0 100644 --- a/rtdata/languages/Polish +++ b/rtdata/languages/Polish @@ -1120,7 +1120,6 @@ TP_DEFRINGE_THRESHOLD;Próg TP_DIRPYRDENOISE_BLUE;Chrominancja - Błękit-żółć TP_DIRPYRDENOISE_CHROMA;Chrominancja - Główna TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Moduluje działanie usuwania szumów luminancji -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Działa z obrazami typu raw i nie-raw.\n\nDla obrazów typu raw, działanie redukcji szumów luminancji zależy od gammy wejściowego profilu ICC. Z góry założona jest gamma sRGB, zatem jeśli obraz wejściowy ma profil o innej gammie można się spodziewać zmian w działaniu rekucji szumów luminancji. TP_DIRPYRDENOISE_ENH;Tryb ulepszony TP_DIRPYRDENOISE_ENH_TOOLTIP;Ulepsza jakość usuwania szumów kosztem około 20% wzrostu czasu przetwarzania. TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1134,7 +1133,6 @@ TP_DIRPYRDENOISE_LUMA;Luminacja TP_DIRPYRDENOISE_MED;Filtr Mediana TP_DIRPYRDENOISE_MEDMETHOD;Metoda mediana TP_DIRPYRDENOISE_MEDTYPE;Rodzaj mediana -TP_DIRPYRDENOISE_MED_TOOLTIP;Włącz odszumianie metodą mediana. TP_DIRPYRDENOISE_METHOD;Metoda TP_DIRPYRDENOISE_METHOD11;Jakość TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Jakość może zostać dopasowana do wzoru szumów. Ustawienie "wysoka" ulepsza odszumianie około 20% wzrostu czasu przetwarzania. @@ -1659,6 +1657,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet @@ -1685,7 +1684,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 @@ -1701,6 +1700,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_NAVIGATIONFRAME;Navigation @@ -1715,6 +1715,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_PROFILE_NONE;None !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1731,6 +1732,9 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_CBDL_AFT;After Black-and-White !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located @@ -1760,7 +1764,6 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MET_TOOLTIP;Apply a median filter of the desired window size. The larger the window's size, the longer it takes.\n\n3×3 soft: treats 5 pixels in a 3×3 pixel window.\n3×3: treats 9 pixels in a 3×3 pixel window.\n5×5 soft: treats 13 pixels in a 5×5 pixel window.\n5×5: treats 25 pixels in a 5×5 pixel window.\n7×7: treats 49 pixels in a 7×7 pixel window.\n9×9: treats 81 pixels in a 9×9 pixel window.\n\nSometimes it is possible to achieve higher quality running several iterations with a smaller window size than one iteration with a larger one. @@ -1785,6 +1788,8 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. diff --git a/rtdata/languages/Polish (Latin Characters) b/rtdata/languages/Polish (Latin Characters) index 5ff2cc31b..e4bd5fc83 100644 --- a/rtdata/languages/Polish (Latin Characters) +++ b/rtdata/languages/Polish (Latin Characters) @@ -1120,7 +1120,6 @@ TP_DEFRINGE_THRESHOLD;Prog TP_DIRPYRDENOISE_BLUE;Chrominancja - Blekit-zolc TP_DIRPYRDENOISE_CHROMA;Chrominancja - Glowna TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Moduluje dzialanie usuwania szumow luminancji -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Dziala z obrazami typu raw i nie-raw.\n\nDla obrazow typu raw, dzialanie redukcji szumow luminancji zalezy od gammy wejsciowego profilu ICC. Z gory zalozona jest gamma sRGB, zatem jesli obraz wejsciowy ma profil o innej gammie mozna sie spodziewac zmian w dzialaniu rekucji szumow luminancji. TP_DIRPYRDENOISE_ENH;Tryb ulepszony TP_DIRPYRDENOISE_ENH_TOOLTIP;Ulepsza jakosc usuwania szumow kosztem okolo 20% wzrostu czasu przetwarzania. TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1134,7 +1133,6 @@ TP_DIRPYRDENOISE_LUMA;Luminacja TP_DIRPYRDENOISE_MED;Filtr Mediana TP_DIRPYRDENOISE_MEDMETHOD;Metoda mediana TP_DIRPYRDENOISE_MEDTYPE;Rodzaj mediana -TP_DIRPYRDENOISE_MED_TOOLTIP;Wlacz odszumianie metoda mediana. TP_DIRPYRDENOISE_METHOD;Metoda TP_DIRPYRDENOISE_METHOD11;Jakosc TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Jakosc moze zostac dopasowana do wzoru szumow. Ustawienie "wysoka" ulepsza odszumianie okolo 20% wzrostu czasu przetwarzania. @@ -1659,6 +1657,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet @@ -1685,7 +1684,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 @@ -1701,6 +1700,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_NAVIGATIONFRAME;Navigation @@ -1715,6 +1715,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_PROFILE_NONE;None !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1731,6 +1732,9 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_CBDL_AFT;After Black-and-White !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located @@ -1760,7 +1764,6 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MET_TOOLTIP;Apply a median filter of the desired window size. The larger the window's size, the longer it takes.\n\n3×3 soft: treats 5 pixels in a 3×3 pixel window.\n3×3: treats 9 pixels in a 3×3 pixel window.\n5×5 soft: treats 13 pixels in a 5×5 pixel window.\n5×5: treats 25 pixels in a 5×5 pixel window.\n7×7: treats 49 pixels in a 7×7 pixel window.\n9×9: treats 81 pixels in a 9×9 pixel window.\n\nSometimes it is possible to achieve higher quality running several iterations with a smaller window size than one iteration with a larger one. @@ -1785,6 +1788,8 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. diff --git a/rtdata/languages/Portugues (Brasil) b/rtdata/languages/Portugues (Brasil) index 9891c07b3..f12205c7e 100644 --- a/rtdata/languages/Portugues (Brasil) +++ b/rtdata/languages/Portugues (Brasil) @@ -954,6 +954,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1122,7 +1123,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1158,6 +1159,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1181,7 +1183,8 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1238,6 +1241,8 @@ TP_WBALANCE_TEMPERATURE;Temperatura !SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1245,6 +1250,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1451,7 +1457,6 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Can be used on raw and non-raw images.\n\nFor non-raw images noise reduction of luminance depends on the gamma of the input color profile. An sRGB gamma is assumed, thus if the image uses an input color profile of a different gamma, the effects of luminance noise reduction will differ. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1466,13 +1471,11 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. @@ -1582,6 +1585,8 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. @@ -1798,7 +1803,6 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/Russian b/rtdata/languages/Russian index b792e92bc..139d87b49 100644 --- a/rtdata/languages/Russian +++ b/rtdata/languages/Russian @@ -973,7 +973,6 @@ TP_DEFRINGE_RADIUS;Радиус TP_DEFRINGE_THRESHOLD;Порог TP_DIRPYRDENOISE_BLUE;Цветность: синий-жёлтый TP_DIRPYRDENOISE_CHROMA;Цветность -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Может использоваться как для raw, так и для обычных изображений.\n\nДля не-raw файлов подавление яркостного шума зависит от гаммы входящего цветового профиля, причём подразумевается гамма sRGB. Поэтому, если снимок имеет цветовой профиль с иной гаммой, результаты операции могут варьировать. TP_DIRPYRDENOISE_ENH;Улучшенный режим TP_DIRPYRDENOISE_ENH_TOOLTIP;Улучшает качество шумоподавления путём увеличения времени обработки на 20%. TP_DIRPYRDENOISE_GAMMA;Гамма @@ -1517,6 +1516,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet @@ -1561,7 +1561,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 @@ -1579,6 +1579,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1594,6 +1595,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_PROFILE_NONE;None !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1610,6 +1612,9 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_SET_RGBABS;Absolute RGB !TP_BWMIX_SET_RGBREL;Relative RGB !TP_BWMIX_SET_ROYGCBPMABS;Absolute ROYGCBPM @@ -1715,13 +1720,11 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. !TP_DIRPYRDENOISE_METM_TOOLTIP;When using the "Luminance only" and "L*a*b*" methods, median filtering will be performed just after the wavelet step in the noise reduction pipeline.\nWhen using the "RGB" mode, it will be performed at the very end of the noise reduction pipeline. @@ -1765,6 +1768,8 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. !TP_ICM_PROFILEINTENT;Rendering Intent !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance diff --git a/rtdata/languages/Serbian (Cyrilic Characters) b/rtdata/languages/Serbian (Cyrilic Characters) index 5145322d2..89707bca4 100644 --- a/rtdata/languages/Serbian (Cyrilic Characters) +++ b/rtdata/languages/Serbian (Cyrilic Characters) @@ -1080,7 +1080,6 @@ TP_DEFRINGE_THRESHOLD;Праг TP_DETAIL_AMOUNT;Количина TP_DIRPYRDENOISE_BLUE;Хроминанса: Плава-Жута TP_DIRPYRDENOISE_CHROMA;Боја -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Може се употребити за raw или не-raw слике.\n\nЗа слике које нису у raw формату уклањање шума луминансе зависи од гаме улазног профила боја. Подразумева се употреба sRGB профила, па ће ефекат уклањања шума луминансе бити различит уколико се користи профил боја са другом вредношћу гаме. TP_DIRPYRDENOISE_ENH;Побољшани режим TP_DIRPYRDENOISE_ENH_TOOLTIP;Повећава квалитет уклањања шума на уштрб око 20% времена за обраду. TP_DIRPYRDENOISE_GAMMA;Гама @@ -1684,6 +1683,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet !MAIN_TAB_WAVELET_TOOLTIP;Shortcut: Alt-w @@ -1727,7 +1727,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 @@ -1745,6 +1745,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1760,6 +1761,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_PROFILE_NONE;None !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1774,7 +1776,10 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_WLONE;One level !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_BL;Bottom-left +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_FILTER_TOOLTIP;The color filter simulates shots taken with a colored filter placed in front of the lens. Colored filters reduce the transmission of specific color ranges and therefore affect their lightness. E.g. a red filter darkens blue skies. !TP_BWMIX_FILTER_YELLOW;Yellow !TP_BWMIX_GAMMA;Gamma Correction @@ -1848,13 +1853,11 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. !TP_DIRPYRDENOISE_METM_TOOLTIP;When using the "Luminance only" and "L*a*b*" methods, median filtering will be performed just after the wavelet step in the noise reduction pipeline.\nWhen using the "RGB" mode, it will be performed at the very end of the noise reduction pipeline. @@ -1898,6 +1901,8 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_PROFILEINTENT;Rendering Intent diff --git a/rtdata/languages/Serbian (Latin Characters) b/rtdata/languages/Serbian (Latin Characters) index c770ad345..c40fb9577 100644 --- a/rtdata/languages/Serbian (Latin Characters) +++ b/rtdata/languages/Serbian (Latin Characters) @@ -1080,7 +1080,6 @@ TP_DEFRINGE_THRESHOLD;Prag TP_DETAIL_AMOUNT;Količina TP_DIRPYRDENOISE_BLUE;Hrominansa: Plava-Žuta TP_DIRPYRDENOISE_CHROMA;Boja -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Može se upotrebiti za raw ili ne-raw slike.\n\nZa slike koje nisu u raw formatu uklanjanje šuma luminanse zavisi od game ulaznog profila boja. Podrazumeva se upotreba sRGB profila, pa će efekat uklanjanja šuma luminanse biti različit ukoliko se koristi profil boja sa drugom vrednošću game. TP_DIRPYRDENOISE_ENH;Poboljšani režim TP_DIRPYRDENOISE_ENH_TOOLTIP;Povećava kvalitet uklanjanja šuma na uštrb oko 20% vremena za obradu. TP_DIRPYRDENOISE_GAMMA;Gama @@ -1684,6 +1683,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet !MAIN_TAB_WAVELET_TOOLTIP;Shortcut: Alt-w @@ -1727,7 +1727,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 @@ -1745,6 +1745,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1760,6 +1761,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_PROFILE_NONE;None !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1774,7 +1776,10 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_WLONE;One level !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_BL;Bottom-left +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_FILTER_TOOLTIP;The color filter simulates shots taken with a colored filter placed in front of the lens. Colored filters reduce the transmission of specific color ranges and therefore affect their lightness. E.g. a red filter darkens blue skies. !TP_BWMIX_FILTER_YELLOW;Yellow !TP_BWMIX_GAMMA;Gamma Correction @@ -1848,13 +1853,11 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. !TP_DIRPYRDENOISE_METM_TOOLTIP;When using the "Luminance only" and "L*a*b*" methods, median filtering will be performed just after the wavelet step in the noise reduction pipeline.\nWhen using the "RGB" mode, it will be performed at the very end of the noise reduction pipeline. @@ -1898,6 +1901,8 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_PROFILEINTENT;Rendering Intent diff --git a/rtdata/languages/Slovak b/rtdata/languages/Slovak index 90eef3409..fc119da9b 100644 --- a/rtdata/languages/Slovak +++ b/rtdata/languages/Slovak @@ -1017,6 +1017,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -1172,7 +1173,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1208,6 +1209,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode @@ -1228,6 +1230,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1277,6 +1280,8 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1284,6 +1289,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1489,7 +1495,6 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Can be used on raw and non-raw images.\n\nFor non-raw images noise reduction of luminance depends on the gamma of the input color profile. An sRGB gamma is assumed, thus if the image uses an input color profile of a different gamma, the effects of luminance noise reduction will differ. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA_TOOLTIP;Gamma varies noise reduction strength across the range of tones. Smaller values will target shadows, while larger values will stretch the effect to the brighter tones. @@ -1501,13 +1506,11 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. @@ -1610,6 +1613,8 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. @@ -1806,7 +1811,6 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/Suomi b/rtdata/languages/Suomi index 612df257d..e86128dbd 100644 --- a/rtdata/languages/Suomi +++ b/rtdata/languages/Suomi @@ -955,6 +955,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1123,7 +1124,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1159,6 +1160,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1182,7 +1184,8 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1238,6 +1241,8 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1245,6 +1250,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1451,7 +1457,6 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Can be used on raw and non-raw images.\n\nFor non-raw images noise reduction of luminance depends on the gamma of the input color profile. An sRGB gamma is assumed, thus if the image uses an input color profile of a different gamma, the effects of luminance noise reduction will differ. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1466,13 +1471,11 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. @@ -1582,6 +1585,8 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. @@ -1798,7 +1803,6 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/Swedish b/rtdata/languages/Swedish index fbdb4c3ae..5b7f64af3 100644 --- a/rtdata/languages/Swedish +++ b/rtdata/languages/Swedish @@ -1248,7 +1248,6 @@ TP_DIRPYRDENOISE_CHROMA;Kroma TP_DIRPYRDENOISE_CHROMAFR;Krominans TP_DIRPYRDENOISE_CUR;Kurva TP_DIRPYRDENOISE_CURVEEDITOR_CC;Kroma -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Kan användas på rå- och icke-råbilder.\n\nFör icke-råbilder beror brusreduceringen (~luminans) på in-profilens gamma. Gamma hos sRGB antas, och således: om bildens profil har ett annat gammavärde, så kommer brusreduceringen att variera. TP_DIRPYRDENOISE_ENH;Förbättrat läge TP_DIRPYRDENOISE_ENH_TOOLTIP;Ökar kvaliteten på brusreduceringen till priset av 20 % längre beräkningstid TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1787,6 +1786,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor !MONITOR_PROFILE_SYSTEM;System default !PARTIALPASTE_COLORTONING;Color toning @@ -1800,17 +1800,22 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !PREFERENCES_MAX;Maxi (Tile) !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_PARSEDEXTDOWNHINT;Move selected extension down in the list. !PREFERENCES_PARSEDEXTUPHINT;Move selected extension up in the list. !PREFERENCES_PROFILE_NONE;None +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_TINB;Number of tiles !PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file !SAVEDLG_SUBSAMP;Subsampling !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_CBDL_AFT;After Black-and-White !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located @@ -1841,11 +1846,9 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise !TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) !TP_DIRPYRDENOISE_LTYPE;Luminance control -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. !TP_DIRPYRDENOISE_METM_TOOLTIP;When using the "Luminance only" and "L*a*b*" methods, median filtering will be performed just after the wavelet step in the noise reduction pipeline.\nWhen using the "RGB" mode, it will be performed at the very end of the noise reduction pipeline. !TP_DIRPYRDENOISE_MET_TOOLTIP;Apply a median filter of the desired window size. The larger the window's size, the longer it takes.\n\n3×3 soft: treats 5 pixels in a 3×3 pixel window.\n3×3: treats 9 pixels in a 3×3 pixel window.\n5×5 soft: treats 13 pixels in a 5×5 pixel window.\n5×5: treats 25 pixels in a 5×5 pixel window.\n7×7: treats 49 pixels in a 7×7 pixel window.\n9×9: treats 81 pixels in a 9×9 pixel window.\n\nSometimes it is possible to achieve higher quality running several iterations with a smaller window size than one iteration with a larger one. @@ -1868,6 +1871,8 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_PROFILEINTENT;Rendering Intent !TP_NEUTRAL;Reset !TP_PRSHARPENING_LABEL;Post-Resize Sharpening diff --git a/rtdata/languages/Turkish b/rtdata/languages/Turkish index 0af0611d5..3003f459f 100644 --- a/rtdata/languages/Turkish +++ b/rtdata/languages/Turkish @@ -954,6 +954,7 @@ TP_WBALANCE_TEMPERATURE;Isı !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale +!HISTORY_MSG_443;Output Black Point Compensation !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 @@ -1122,7 +1123,7 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_FLUOF2;Fluorescent F2 !PREFERENCES_FLUOF7;Fluorescent F7 !PREFERENCES_FLUOF11;Fluorescent F11 -!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +!PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. !PREFERENCES_GREY;Output device's Yb luminance (%) !PREFERENCES_GREY05;Yb=05 CIE L#30 @@ -1158,6 +1159,7 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) +!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform !PREFERENCES_MONINTENT;Default monitor intent !PREFERENCES_MONPROFILE;Default monitor profile !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1181,7 +1183,8 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select font +!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files !PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP;When working with folders full of uncompressed tiff files enabling this option can increase performance of thumb generation. @@ -1237,6 +1240,8 @@ TP_WBALANCE_TEMPERATURE;Isı !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. !SAVEDLG_WARNFILENAME;File will be named !SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_B;Bottom !THRESHOLDSELECTOR_BL;Bottom-left !THRESHOLDSELECTOR_BR;Bottom-right @@ -1244,6 +1249,7 @@ TP_WBALANCE_TEMPERATURE;Isı !THRESHOLDSELECTOR_T;Top !THRESHOLDSELECTOR_TL;Top-left !THRESHOLDSELECTOR_TR;Top-right +!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool !TP_BWMIX_ALGO;Algorithm OYCPM !TP_BWMIX_ALGO_LI;Linear !TP_BWMIX_ALGO_SP;Special effects @@ -1450,7 +1456,6 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma !TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. !TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Can be used on raw and non-raw images.\n\nFor non-raw images noise reduction of luminance depends on the gamma of the input color profile. An sRGB gamma is assumed, thus if the image uses an input color profile of a different gamma, the effects of luminance noise reduction will differ. !TP_DIRPYRDENOISE_ENH;Enhanced mode !TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. !TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1465,13 +1470,11 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_LUMA;Luminance !TP_DIRPYRDENOISE_LUMAFR;Luminance -!TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail !TP_DIRPYRDENOISE_MAN;Manual !TP_DIRPYRDENOISE_MANU;Manual !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type -!TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising !TP_DIRPYRDENOISE_METHOD;Method !TP_DIRPYRDENOISE_METHOD11;Quality !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. @@ -1581,6 +1584,8 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +!TP_ICM_BPC;Black Point Compensation +!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated !TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. @@ -1797,7 +1802,6 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_SHARPENEDGE_LABEL;Edges !TP_SHARPENEDGE_PASSES;Iterations !TP_SHARPENEDGE_THREE;Luminance only -!TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. !TP_SHARPENMICRO_AMOUNT;Quantity !TP_SHARPENMICRO_LABEL;Microcontrast !TP_SHARPENMICRO_MATRIX;3×3 matrix instead of 5×5 diff --git a/rtdata/languages/default b/rtdata/languages/default index f349ebd56..d04487752 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -674,7 +674,8 @@ HISTORY_MSG_439;Retinex - Process HISTORY_MSG_440;CbDL - Method HISTORY_MSG_441;Retinex - Gain transmission HISTORY_MSG_442;Retinex - Scale -HISTORY_MSG_443;Spot removal +HISTORY_MSG_443;Output Black Point Compensation +HISTORY_MSG_444;Spot removal HISTORY_NEWSNAPSHOT;Add HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s HISTORY_SNAPSHOT;Snapshot @@ -957,7 +958,7 @@ PREFERENCES_FLUOF7;Fluorescent F7 PREFERENCES_FLUOF11;Fluorescent F11 PREFERENCES_FORIMAGE;For non-raw photos PREFERENCES_FORRAW;For raw photos -PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Editor's panel and the File Browser +PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. PREFERENCES_GIMPPATH;GIMP installation directory PREFERENCES_GREY;Output device's Yb luminance (%) @@ -1001,6 +1002,7 @@ PREFERENCES_MENUGROUPRANK;Group "Rank" PREFERENCES_MENUOPTIONS;Context Menu Options PREFERENCES_METADATA;Metadata PREFERENCES_MIN;Mini (100x115) +PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform PREFERENCES_MONINTENT;Default monitor intent PREFERENCES_MONPROFILE;Default monitor profile PREFERENCES_MULTITAB;Multiple Editor Tabs Mode @@ -1040,7 +1042,8 @@ PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -PREFERENCES_SELECTFONT;Select font +PREFERENCES_SELECTFONT;Select global font +PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font PREFERENCES_SELECTLANG;Select language PREFERENCES_SELECTTHEME;Select theme PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings @@ -1136,6 +1139,8 @@ SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved h SAVEDLG_TIFFUNCOMPRESSED;Uncompressed TIFF SAVEDLG_WARNFILENAME;File will be named SHCSELECTOR_TOOLTIP;Click right mouse button to reset the position of those 3 sliders. +SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. +SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. THRESHOLDSELECTOR_B;Bottom THRESHOLDSELECTOR_BL;Bottom-left THRESHOLDSELECTOR_BR;Bottom-right @@ -1143,6 +1148,7 @@ THRESHOLDSELECTOR_HINT;Hold the Shift key to move individual control poin THRESHOLDSELECTOR_T;Top THRESHOLDSELECTOR_TL;Top-left THRESHOLDSELECTOR_TR;Top-right +TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool TOOLBAR_TOOLTIP_CROP;Crop selection.\nShortcut: c\nMove the crop area using Shift-mouse drag TOOLBAR_TOOLTIP_HAND;Hand tool.\nShortcut: h TOOLBAR_TOOLTIP_STRAIGHTEN;Straighten / fine rotation.\nShortcut: s\n\nIndicate the vertical or horizontal by drawing a guide line over the image preview. Angle of rotation will be shown next to the guide line. Center of rotation is the geometrical center of the image. @@ -1375,7 +1381,6 @@ TP_DIRPYRDENOISE_CUR;Curve TP_DIRPYRDENOISE_CURVEEDITOR_CC;Chroma TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -TP_DIRPYRDENOISE_ENABLED_TOOLTIP;Can be used on raw and non-raw images.\n\nFor non-raw images noise reduction of luminance depends on the gamma of the input color profile. An sRGB gamma is assumed, thus if the image uses an input color profile of a different gamma, the effects of luminance noise reduction will differ. TP_DIRPYRDENOISE_ENH;Enhanced mode TP_DIRPYRDENOISE_ENH_TOOLTIP;Increases noise reduction quality at the expense of a 20% processing time increase. TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1390,13 +1395,11 @@ TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) TP_DIRPYRDENOISE_LTYPE;Luminance control TP_DIRPYRDENOISE_LUMA;Luminance TP_DIRPYRDENOISE_LUMAFR;Luminance -TP_DIRPYRDENOISE_LUMAFR_TOOLTIP;Wavelet on luminance and Fourier transform for luminance detail TP_DIRPYRDENOISE_MAN;Manual TP_DIRPYRDENOISE_MANU;Manual TP_DIRPYRDENOISE_MED;Median Filter TP_DIRPYRDENOISE_MEDMETHOD;Median method TP_DIRPYRDENOISE_MEDTYPE;Median type -TP_DIRPYRDENOISE_MED_TOOLTIP;Enabled median denoising TP_DIRPYRDENOISE_METHOD;Method TP_DIRPYRDENOISE_METHOD11;Quality TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. @@ -1522,6 +1525,8 @@ TP_ICM_APPLYLOOKTABLE;Look table TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. +TP_ICM_BPC;Black Point Compensation +TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point TP_ICM_DCPILLUMINANT;Illuminant TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. @@ -1780,7 +1785,6 @@ TP_SHARPENING_RLD_AMOUNT;Amount TP_SHARPENING_RLD_DAMPING;Damping TP_SHARPENING_RLD_ITERATIONS;Iterations TP_SHARPENING_THRESHOLD;Threshold -TP_SHARPENING_TOOLTIP;Expect a slightly different effect when using with CIECAM02. If difference is observed, adjust to taste. TP_SHARPENING_USM;Unsharp Mask TP_SHARPENMICRO_AMOUNT;Quantity TP_SHARPENMICRO_LABEL;Microcontrast diff --git a/rtdata/rt_splash_5.png b/rtdata/rt_splash_5.png new file mode 100644 index 000000000..71486b132 Binary files /dev/null and b/rtdata/rt_splash_5.png differ diff --git a/rtdata/rt_splash_5.svg b/rtdata/rt_splash_5.svg new file mode 100644 index 000000000..78620dd68 --- /dev/null +++ b/rtdata/rt_splash_5.svg @@ -0,0 +1,1770 @@ + + + + + RawTherapee logo white font white glow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + RawTherapee logo white font white glow + + + RawTherapee + + + + + rawtherapee + logo + white + + + www.rawtherapee.com + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Select the desired element and apply one of the effects in the Filter Editor. You might need to ungroup the element before applying. For example to set the RT ring to have a colorful glow, select it and enable the "ring glow". You can change the flood color of the "ring shadow" effect to make it white if you want to make the logo usable on a dark background.For logo specifics, refer to rt_logo.svg Raw + Therapee + "Raw" font Eras-UltraBlk, 69px, -3px spacing between characters, skewed 2° to the right."Therapee" font Eras-Medium, 68px, 4px spacing between characters, skewed 2° to the right.Both have a dropshadow with an opacity of 0.40 and Gaussian blur standard deviation of 3.5.Version number Eras bold 64 or less.Eras font from "freefonts-0.10":ftp://ftp.gimp.org/pub/gimp/fonts/ RawTherapee splash screen design version 1.0 from 2014-05-03 | www.rawtherapee.com + GNU GPLv3 + 5 + + + diff --git a/rtengine/CA_correct_RT.cc b/rtengine/CA_correct_RT.cc index 64bb19113..7c28801ae 100644 --- a/rtengine/CA_correct_RT.cc +++ b/rtengine/CA_correct_RT.cc @@ -156,11 +156,9 @@ void RawImageSource::CA_correct_RT(const double cared, const double cablue, cons const int vblsz = ceil((float)(height + border2) / (ts - border2) + 2 + vz1); const int hblsz = ceil((float)(width + border2) / (ts - border2) + 2 + hz1); - char *buffer1 = (char *) calloc(vblsz * hblsz * (2 * 2 + 1), sizeof(float)); - //block CA shift values and weight assigned to block - float *blockwt = (float*)buffer1; - float (*blockshifts)[2][2] = (float (*)[2][2])(buffer1 + (vblsz * hblsz * sizeof(float))); + float* const blockwt = static_cast(calloc(vblsz * hblsz * (2 * 2 + 1), sizeof(float))); + float (*blockshifts)[2][2] = (float (*)[2][2])(blockwt + vblsz * hblsz); double fitparams[2][2][16]; @@ -1013,7 +1011,7 @@ void RawImageSource::CA_correct_RT(const double cared, const double cablue, cons } free(Gtmp); - free(buffer1); + free(blockwt); free(RawDataTmp); if(plistener) { diff --git a/rtengine/CMakeLists.txt b/rtengine/CMakeLists.txt index a1ab06657..cb484dead 100644 --- a/rtengine/CMakeLists.txt +++ b/rtengine/CMakeLists.txt @@ -14,7 +14,7 @@ set (RTENGINESOURCEFILES colortemp.cc curves.cc flatcurves.cc diagonalcurves.cc stdimagesource.cc myfile.cc iccjpeg.cc improccoordinator.cc pipettebuffer.cc coord.cc alpha.cc spot.cc processingjob.cc rtthumbnail.cc utils.cc labimage.cc slicer.cc cieimage.cc iplab2rgb.cc ipsharpen.cc iptransform.cc ipresize.cc ipvibrance.cc - imagedimensions.cc jpeg_memsrc.cc jdatasrc.cc iimage.cc + imagedimensions.cc jpeg_ijg/jpeg_memsrc.cc jdatasrc.cc iimage.cc EdgePreservingDecomposition.cc cplx_wavelet_dec.cc FTblockDN.cc PF_correct_RT.cc previewimage.cc ipwavelet.cc dirpyr_equalizer.cc diff --git a/rtengine/EdgePreserveLab.cc b/rtengine/EdgePreserveLab.cc deleted file mode 100644 index 1f063ec0c..000000000 --- a/rtengine/EdgePreserveLab.cc +++ /dev/null @@ -1,264 +0,0 @@ -#include "EdgePreserveLab.h" -#include "boxblur.h" -#include - -#ifdef _OPENMP -#include -#endif - -//#define MAX(a,b) ((a)<(b)?(b):(a)) -//#define MIN(a,b) ((a)>(b)?(b):(a)) - -//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - -EdgePreserveLab::EdgePreserveLab(unsigned int width, unsigned int height) -{ - w = width; - h = height; - n = w * h; - - //Initialize the matrix just once at construction. - A = new MultiDiagonalSymmetricMatrix(n, 5); - - if(!( - A->CreateDiagonal(0, 0) && - A->CreateDiagonal(1, 1) && - A->CreateDiagonal(2, w - 1) && - A->CreateDiagonal(3, w) && - A->CreateDiagonal(4, w + 1))) { - delete A; - A = NULL; - printf("Error in EdgePreserveLab construction: out of memory.\n"); - } else { - a0 = A->Diagonals[0]; - a_1 = A->Diagonals[1]; - a_w1 = A->Diagonals[2]; - a_w = A->Diagonals[3]; - a_w_1 = A->Diagonals[4]; - } -} - -EdgePreserveLab::~EdgePreserveLab() -{ - delete A; -} - -float *EdgePreserveLab::CreateBlur(float *Source, float LScale, float abScale, float EdgeStoppingLuma, float EdgeStoppingChroma, unsigned int Iterates, float *Blur, bool UseBlurForEdgeStop) -{ - if(Blur == NULL) - UseBlurForEdgeStop = false, //Use source if there's no supplied Blur. - Blur = new float[3 * n]; - - if(LScale == 0.0f) { - memcpy(Blur, Source, 3 * n * sizeof(float)); - return Blur; - } - - //Create the edge stopping function a, rotationally symmetric and just one instead of (ax, ay). Maybe don't need Blur yet, so use its memory. - float *a, *b, *g; - - if(UseBlurForEdgeStop) { - a = new float[n], g = Blur; - } else { - a = Blur, g = Source; - } - - //b = new float[n]; - - unsigned int x, y, i; - unsigned int w1 = w - 1, h1 = h - 1; - float eps = 0.0001f; - float scL = powf(100.0f, LScale); - float scab = powf(200.0f, abScale); - - float * var = new float[w * h]; - rtengine::boxvar(g, var, 1, 1, w, h); - -#ifdef _OPENMP - #pragma omp parallel for -#endif - - for(y = 0; y < h1; y++) { - float *rg = &g[w * y]; - - for(x = 0; x < w1; x++) { - //Estimate the central difference gradient in the center of a four pixel square. (gx, gy) is actually 2*gradient. - /*float gx = (fabs((rg[x + 1] - rg[x]) + (rg[x + w + 1] - rg[x + w]))); - float gy = (fabs((rg[x + w] - rg[x]) + (rg[x + w + 1] - rg[x + 1]))); - - //TODO: combine this with gx, gy if not needing separate quantities - float hx = (fabs((rg[x + 1 + n] - rg[x + n]) + (rg[x + w + 1 + n] - rg[x + w + n])) + \ - fabs((rg[x + 1 + 2*n] - rg[x + 2*n]) + (rg[x + w + 1 + 2*n] - rg[x + w + 2*n]))); - float hy = (fabs((rg[x + w + n] - rg[x + n]) + (rg[x + w + 1 + n] - rg[x + 1 + n])) + \ - fabs((rg[x + w + 2*n] - rg[x + 2*n]) + (rg[x + w + 1 + 2*n] - rg[x + 1 + 2*n]))); - */ - //float gradtot = (gx+gy+hx+hy); - //gradhisto[MAX(0,MIN(32767,(int)gradtot))] ++; - - //Apply power to the magnitude of the gradient to get the edge stopping function. - //a[x + w*y] = scL*expf(-100.0f*(gx + gy + hx + hy)/(EdgeStoppingLuma)); - //a[x + w*y] = scL*expf(-var[y*w+x]/SQR(0.02*EdgeStoppingLuma));///(0.1+rg[x]); - a[x + w * y] = scL * expf(-50.0f * sqrt(var[y * w + x]) / (EdgeStoppingLuma + eps)); ///(0.1+rg[x]); - - //b[x + w*y] = (scab)*expf(-20.0f*(gx + gy + Lave*(hx + hy))/(EdgeStoppingChroma)); - //b[x + w*y] = (scab)*expf(-400.0f*SQR(gx + gy + Lave*(hx + hy))/SQR(EdgeStoppingChroma));; - - } - } - - /* Now setup the linear problem. I use the Maxima CAS, here's code for making an FEM formulation for the smoothness term: - p(x, y) := (1 - x)*(1 - y); - P(m, n) := A[m][n]*p(x, y) + A[m + 1][n]*p(1 - x, y) + A[m + 1][n + 1]*p(1 - x, 1 - y) + A[m][n + 1]*p(x, 1 - y); - Integrate(f) := integrate(integrate(f, x, 0, 1), y, 0, 1); - - Integrate(diff(P(u, v), x)*diff(p(x, y), x) + diff(P(u, v), y)*diff(p(x, y), y)); - Integrate(diff(P(u - 1, v), x)*diff(p(1 - x, y), x) + diff(P(u - 1, v), y)*diff(p(1 - x, y), y)); - Integrate(diff(P(u - 1, v - 1), x)*diff(p(1 - x, 1 - y), x) + diff(P(u - 1, v - 1), y)*diff(p(1 - x, 1 - y), y)); - Integrate(diff(P(u, v - 1), x)*diff(p(x, 1 - y), x) + diff(P(u, v - 1), y)*diff(p(x, 1 - y), y)); - So yeah. Use the numeric results of that to fill the matrix A.*/ - memset(a_1, 0, A->DiagonalLength(1)*sizeof(float)); - memset(a_w1, 0, A->DiagonalLength(w - 1)*sizeof(float)); - memset(a_w, 0, A->DiagonalLength(w)*sizeof(float)); - memset(a_w_1, 0, A->DiagonalLength(w + 1)*sizeof(float)); - -//TODO: OMP here? - for(i = y = 0; y != h; y++) { - for(x = 0; x != w; x++, i++) { - float ac; - a0[i] = 1.0; - - //Remember, only fill the lower triangle. Memory for upper is never made. It's symmetric. Trust. - if(x > 0 && y > 0) - ac = a[i - w - 1] / 6.0f, - a_w_1[i - w - 1] -= 2.0f * ac, a_w[i - w] -= ac, - a_1[i - 1] -= ac, a0[i] += 4.0f * ac; - - if(x < w1 && y > 0) - ac = a[i - w] / 6.0f, - a_w[i - w] -= ac, a_w1[i - w + 1] -= 2.0f * ac, - a0[i] += 4.0f * ac; - - if(x > 0 && y < h1) - ac = a[i - 1] / 6.0f, - a_1[i - 1] -= ac, a0[i] += 4.0f * ac; - - if(x < w1 && y < h1) { - a0[i] += 4.0f * a[i] / 6.0f; - } - } - } - - if(UseBlurForEdgeStop) { - delete[] a; - } - - - //Solve & return. - A->CreateIncompleteCholeskyFactorization(1); //Fill-in of 1 seems to work really good. More doesn't really help and less hurts (slightly). - - if(!UseBlurForEdgeStop) { - memcpy(Blur, Source, 3 * n * sizeof(float)); - } - - // blur L channel - SparseConjugateGradient(A->PassThroughVectorProduct, Source, n, false, Blur, 0.0f, (void *)A, Iterates, A->PassThroughCholeskyBackSolve); - - //reset A for ab channels - /*memset(a_1, 0, A->DiagonalLength(1)*sizeof(float)); - memset(a_w1, 0, A->DiagonalLength(w - 1)*sizeof(float)); - memset(a_w, 0, A->DiagonalLength(w)*sizeof(float)); - memset(a_w_1, 0, A->DiagonalLength(w + 1)*sizeof(float)); - for(i = y = 0; y != h; y++){ - for(x = 0; x != w; x++, i++){ - float ac; - a0[i] = 1.0; - - //Remember, only fill the lower triangle. Memory for upper is never made. It's symmetric. Trust. - if(x > 0 && y > 0) - ac = b[i - w - 1]/6.0f, - a_w_1[i - w - 1] -= 2.0f*ac, a_w[i - w] -= ac, - a_1[i - 1] -= ac, a0[i] += 4.0f*ac; - - if(x < w1 && y > 0) - ac = b[i - w]/6.0f, - a_w[i - w] -= ac, a_w1[i - w + 1] -= 2.0f*ac, - a0[i] += 4.0f*ac; - - if(x > 0 && y < h1) - ac = b[i - 1]/6.0f, - a_1[i - 1] -= ac, a0[i] += 4.0f*ac; - - if(x < w1 && y < h1) - a0[i] += 4.0f*b[i]/6.0f; - } - }*/ - /*if(UseBlurForEdgeStop)*/ //delete[] b; - - // blur ab channels - //A->CreateIncompleteCholeskyFactorization(1); //Fill-in of 1 seems to work really good. More doesn't really help and less hurts (slightly). - //SparseConjugateGradient(A->PassThroughVectorProduct, Source+n, n, false, Blur+n, 0.0f, (void *)A, Iterates, A->PassThroughCholeskyBackSolve); - //SparseConjugateGradient(A->PassThroughVectorProduct, Source+2*n, n, false, Blur+2*n, 0.0f, (void *)A, Iterates, A->PassThroughCholeskyBackSolve); - - A->KillIncompleteCholeskyFactorization(); - return Blur; -} - -float *EdgePreserveLab::CreateIteratedBlur(float *Source, float LScale, float abScale, float EdgeStoppingLuma, float EdgeStoppingChroma, unsigned int Iterates, unsigned int Reweightings, float *Blur) -{ - //Simpler outcome? - if(Reweightings == 0) { - return CreateBlur(Source, LScale, abScale, EdgeStoppingLuma, EdgeStoppingChroma, Iterates, Blur); - } - - //Create a blur here, initialize. - if(Blur == NULL) { - Blur = new float[3 * n]; - } - - memcpy(Blur, Source, 3 * n * sizeof(float)); - - //Iteratively improve the blur. - Reweightings++; - - for(unsigned int i = 0; i != Reweightings; i++) { - CreateBlur(Source, LScale, abScale, EdgeStoppingLuma, EdgeStoppingChroma, Iterates, Blur, true); - } - - return Blur; -} - -float *EdgePreserveLab::CompressDynamicRange(float *Source, float LScale, float abScale, float EdgeStoppingLuma, float EdgeStoppingChroma, float CompressionExponent, float DetailBoost, unsigned int Iterates, unsigned int Reweightings, float *Compressed) -{ - //We're working with luminance, which does better logarithmic. - unsigned int i; - //for(i = 0; i != n; i++) - // Source[i] = logf(Source[i] + 0.0001f); - - //Blur. Also setup memory for Compressed (we can just use u since each element of u is used in one calculation). - float *u = CreateIteratedBlur(Source, LScale, abScale, EdgeStoppingLuma, EdgeStoppingChroma, Iterates, Reweightings); - - if(Compressed == NULL) { - Compressed = u; - } - - //Apply compression, detail boost, unlogging. Compression is done on the logged data and detail boost on unlogged. - for(i = 0; i != n; i++) { - //float ce = expf(Source[i] + u[i]*(CompressionExponent - 1.0f)) - 0.0001f; - //float ue = expf(u[i]) - 0.0001f; - //Source[i] = expf(Source[i]) - 0.0001f; - //Compressed[i] = ce + DetailBoost*(Source[i] - ue); - Compressed[i] = u[i];//ue;//for testing, to display blur - } - - if(Compressed != u) { - delete[] u; - } - - return Compressed; -} - - - - diff --git a/rtengine/EdgePreserveLab.h b/rtengine/EdgePreserveLab.h deleted file mode 100644 index e365956c5..000000000 --- a/rtengine/EdgePreserveLab.h +++ /dev/null @@ -1,77 +0,0 @@ -#pragma once -/* -The EdgePreserveLab files contain standard C++ (standard except the first line) code for creating and, to a -limited extent (create your own uses!), messing with multi scale edge preserving decompositions of a 32 bit single channel -image. As a byproduct it contains a lot of linear algebra which can be useful for optimization problems that -you want to solve in rectangles on rectangular grids. - -Anyway. Basically, this is an implementation of what's presented in the following papers: - Edge-Preserving Decompositions for Multi-Scale Tone and Detail Manipulation - An Iterative Solution Method for Linear Systems of Which the Coefficient Matrix is a Symetric M-Matrix - Color correction for tone mapping - Wikipedia, the free encyclopedia - -First one is most of what matters, next two are details, last everything else. I did a few things differently, especially: - Reformulated the minimization with finite elements instead of finite differences. This results in better conditioning, - slightly better accuracy (less artifacts), the possibility of a better picked edge stopping function, but more memory consumption. - - A single rotationally invariant edge stopping function is used instead of two non-invariant ones. - - Incomplete Cholseky factorization instead of Szeliski's LAHBF. Slower, but not subject to any patents. - - For tone mapping, original images are decomposed instead of their logarithms, and just one decomposition is made; - I find that this way works plenty good (theirs isn't better or worse... just different) and is simpler. - -Written by ben_pcc in Portland, Oregon, USA; code modified by Emil Martinec. - - // EdgePreserveLab.h and EdgePreserveLab.cpp are free software: - // you can redistribute it and/or modify it - // under the terms of the GNU General Public License as published by - // the Free Software Foundation, either version 3 of the License, or - // (at your option) any later version. - // - // This program is distributed in the hope that it will be useful, - // but WITHOUT ANY WARRANTY; without even the implied warranty of - // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - // GNU General Public License for more details. - // - // You should have received a copy of the GNU General Public License - // along with this program. If not, see . - -*/ - - - -#include -#include -#include -#include "EdgePreservingDecomposition.h" - -class EdgePreserveLab -{ -public: - EdgePreserveLab(unsigned int width, unsigned int height); - ~EdgePreserveLab(); - - //Create an edge preserving blur of Source. Will create and return, or fill into Blur if not NULL. In place not ok. - //If UseBlurForEdgeStop is true, supplied not NULL Blur is used to calculate the edge stopping function instead of Source. - float *CreateBlur(float *Source, float LScale, float abScale, float EdgeStoppingLuma, float EdgeStoppingChroma, unsigned int Iterates, float *Blur = NULL, bool UseBlurForEdgeStop = false); - - //Iterates CreateBlur such that the smoothness term approaches a specific norm via iteratively reweighted least squares. In place not ok. - float *CreateIteratedBlur(float *Source, float LScale, float abScale, float EdgeStoppingLuma, float EdgeStoppingChroma, unsigned int Iterates, unsigned int Reweightings, float *Blur = NULL); - - /*Lowers global contrast while preserving or boosting local contrast. Can fill into Compressed. The smaller Compression - the more compression is applied, with Compression = 1 giving no effect and above 1 the opposite effect. You can totally - use Compression = 1 and play with DetailBoost for some really sweet unsharp masking. If working on luma/grey, consider giving it a logarithm. - In place calculation to save memory (Source == Compressed) is totally ok. Reweightings > 0 invokes CreateIteratedBlur instead of CreateBlur. */ - float *CompressDynamicRange(float *Source, float LScale = 1.0f, float abScale = 5.0f, float EdgeStoppingLuma = 1.0f, float EdgeStoppingChroma = 1.0f, - float CompressionExponent = 0.8f, float DetailBoost = 0.1f, unsigned int Iterates = 20, - unsigned int Reweightings = 0, float *Compressed = NULL); - -private: - MultiDiagonalSymmetricMatrix *A; //The equations are simple enough to not mandate a matrix class, but fast solution NEEDS a complicated preconditioner. - unsigned int w, h, n; - - //Convenient access to the data in A. - float *a0, *a_1, *a_w, *a_w_1, *a_w1; -}; diff --git a/rtengine/EdgePreservingDecomposition.cc b/rtengine/EdgePreservingDecomposition.cc index 927bfac2d..7bc292c3f 100644 --- a/rtengine/EdgePreservingDecomposition.cc +++ b/rtengine/EdgePreservingDecomposition.cc @@ -17,20 +17,20 @@ calculates A x where x is some vector. Stops when rms residual < RMSResidual or Stops at n iterates if MaximumIterates = 0 since that many iterates gives exact solution. Applicable to symmetric positive definite problems only, which is what unconstrained smooth optimization pretty much always is. Parameter pass can be passed through, containing whatever info you like it to contain (matrix info?). -Takes less memory with OkToModify_b = true, and Preconditioner = NULL. */ +Takes less memory with OkToModify_b = true, and Preconditioner = nullptr. */ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), float *b, int n, bool OkToModify_b, float *x, float RMSResidual, void *Pass, int MaximumIterates, void Preconditioner(float *Product, float *x, void *Pass)) { int iterate, i; - char* buffer = (char*)malloc(2 * n * sizeof(float) + 128); - float *r = (float*)(buffer + 64); + float* buffer = (float*)malloc(2 * n * sizeof(float) + 128); + float *r = (buffer + 16); //Start r and x. - if(x == NULL) { + if(x == nullptr) { x = new float[n]; - memset(x, 0, sizeof(float)*n); //Zero initial guess if x == NULL. + memset(x, 0, sizeof(float)*n); //Zero initial guess if x == nullptr. memcpy(r, b, sizeof(float)*n); } else { Ax(r, x, Pass); @@ -46,7 +46,7 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl //s is preconditionment of r. Without, direct to r. float *s = r, rs = 0.0f; - if(Preconditioner != NULL) { + if(Preconditioner != nullptr) { s = new float[n]; Preconditioner(s, r, Pass); @@ -61,7 +61,7 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl } //Search direction d. - float *d = (float*)(buffer + n * sizeof(float) + 128); + float *d = (buffer + n + 32); memcpy(d, s, sizeof(float)*n); @@ -114,7 +114,7 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl break; } - if(Preconditioner != NULL) { + if(Preconditioner != nullptr) { Preconditioner(s, r, Pass); } @@ -127,15 +127,13 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl #endif { float c = 0.0f; - float t; - float temp; #ifdef _OPENMP #pragma omp for reduction(+:rs) // Summation with error correction #endif for(int ii = 0; ii < n; ii++) { - temp = r[ii] * s[ii]; - t = rs + temp; + float temp = r[ii] * s[ii]; + float t = rs + temp; if( fabsf(rs) >= fabsf(temp) ) { c += ((rs - t) + temp); @@ -183,11 +181,11 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl return x; } -MultiDiagonalSymmetricMatrix::MultiDiagonalSymmetricMatrix(int Dimension, int NumberOfDiagonalsInLowerTriangle) +MultiDiagonalSymmetricMatrix::MultiDiagonalSymmetricMatrix(int Dimension, int NumberOfDiagonalsInLowerTriangle) : buffer(nullptr), DiagBuffer(nullptr) { n = Dimension; m = NumberOfDiagonalsInLowerTriangle; - IncompleteCholeskyFactorization = NULL; + IncompleteCholeskyFactorization = nullptr; Diagonals = new float *[m]; StartRows = new int [m + 1]; @@ -198,7 +196,7 @@ MultiDiagonalSymmetricMatrix::MultiDiagonalSymmetricMatrix(int Dimension, int Nu MultiDiagonalSymmetricMatrix::~MultiDiagonalSymmetricMatrix() { - if(DiagBuffer != NULL) { + if(DiagBuffer != nullptr) { free(buffer); } else for(int i = 0; i < m; i++) { @@ -218,12 +216,12 @@ bool MultiDiagonalSymmetricMatrix::CreateDiagonal(int index, int StartRow) if(index == 0) { buffer = (char*)calloc( (n + padding) * m * sizeof(float) + (m + 16) * 64 + 63, 1); - if(buffer == NULL) + if(buffer == nullptr) // no big memory block available => try to allocate smaller blocks { - DiagBuffer = NULL; + DiagBuffer = nullptr; } else { - DiagBuffer = (char*)( ( uintptr_t(buffer) + uintptr_t(63)) / 64 * 64); + DiagBuffer = (float*)( ( uintptr_t(buffer) + uintptr_t(63)) / 64 * 64); } } @@ -238,12 +236,12 @@ bool MultiDiagonalSymmetricMatrix::CreateDiagonal(int index, int StartRow) return false; } - if(DiagBuffer != NULL) { - Diagonals[index] = (float*)(DiagBuffer + (index * (n + padding) * sizeof(float)) + ((index + 16) * 64)); + if(DiagBuffer != nullptr) { + Diagonals[index] = (DiagBuffer + (index * (n + padding)) + ((index + 16) * 16)); } else { Diagonals[index] = new float[DiagonalLength(StartRow)]; - if(Diagonals[index] == NULL) { + if(Diagonals[index] == nullptr) { printf("Error in MultiDiagonalSymmetricMatrix::CreateDiagonal: memory allocation failed. Out of memory?\n"); return false; } @@ -305,9 +303,9 @@ SSEFUNCTION void MultiDiagonalSymmetricMatrix::VectorProduct(float* RESTRICT Pro const int chunkSize = (lm - srm) / (omp_get_num_procs() * 32); #else const int chunkSize = (lm - srm) / (omp_get_num_procs() * 8); -#endif #endif #pragma omp parallel +#endif { // First fill the big part in the middle // This can be done without intermediate stores to memory and it can be parallelized too @@ -443,8 +441,8 @@ bool MultiDiagonalSymmetricMatrix::CreateIncompleteCholeskyFactorization(int Max } //It's all initialized? Uhkay. Do the actual math then. - int sss, ss, s; - int k, MaxStartRow = StartRows[m - 1]; //Handy number. + int sss, ss; + int MaxStartRow = StartRows[m - 1]; //Handy number. float **l = ic->Diagonals; float *d = ic->Diagonals[0]; //Describes D in LDLt. int icm = ic->m; @@ -506,8 +504,8 @@ bool MultiDiagonalSymmetricMatrix::CreateIncompleteCholeskyFactorization(int Max //This is a loop over k from 1 to j, inclusive. We'll cover that by looping over the index of the diagonals (s), and get k from it. //The first diagonal is d (k = 0), so skip that and have s start at 1. Cover all available s but stop if k exceeds j. - s = 1; - k = icStartRows[s]; + int s = 1; + int k = icStartRows[s]; while(k <= j) { d[j] -= l[s][j - k] * l[s][j - k] * d[j - k]; @@ -554,7 +552,7 @@ bool MultiDiagonalSymmetricMatrix::CreateIncompleteCholeskyFactorization(int Max return true; } -void MultiDiagonalSymmetricMatrix::KillIncompleteCholeskyFactorization(void) +void MultiDiagonalSymmetricMatrix::KillIncompleteCholeskyFactorization() { delete IncompleteCholeskyFactorization; } @@ -675,7 +673,7 @@ EdgePreservingDecomposition::EdgePreservingDecomposition(int width, int height) A->CreateDiagonal(3, w) && A->CreateDiagonal(4, w + 1))) { delete A; - A = NULL; + A = nullptr; printf("Error in EdgePreservingDecomposition construction: out of memory.\n"); } else { a0 = A->Diagonals[0]; @@ -694,7 +692,7 @@ EdgePreservingDecomposition::~EdgePreservingDecomposition() SSEFUNCTION float *EdgePreservingDecomposition::CreateBlur(float *Source, float Scale, float EdgeStopping, int Iterates, float *Blur, bool UseBlurForEdgeStop) { - if(Blur == NULL) + if(Blur == nullptr) UseBlurForEdgeStop = false, //Use source if there's no supplied Blur. Blur = new float[n]; @@ -713,9 +711,7 @@ SSEFUNCTION float *EdgePreservingDecomposition::CreateBlur(float *Source, float a = Blur, g = Source; } - int i; int w1 = w - 1, h1 = h - 1; -// float eps = 0.02f; const float sqreps = 0.0004f; // removed eps*eps from inner loop @@ -868,7 +864,7 @@ float *EdgePreservingDecomposition::CreateIteratedBlur(float *Source, float Scal } //Create a blur here, initialize. - if(Blur == NULL) { + if(Blur == nullptr) { Blur = new float[n]; } @@ -927,7 +923,7 @@ SSEFUNCTION float *EdgePreservingDecomposition::CompressDynamicRange(float *Sour //Blur. Also setup memory for Compressed (we can just use u since each element of u is used in one calculation). float *u = CreateIteratedBlur(Source, Scale, EdgeStopping, Iterates, Reweightings); - if(Compressed == NULL) { + if(Compressed == nullptr) { Compressed = u; } diff --git a/rtengine/EdgePreservingDecomposition.h b/rtengine/EdgePreservingDecomposition.h index 04ebfe3b6..bf567f103 100644 --- a/rtengine/EdgePreservingDecomposition.h +++ b/rtengine/EdgePreservingDecomposition.h @@ -67,13 +67,16 @@ ben_s or nonbasketless. Enjoy! #include #include #include + #include "opthelper.h" +#include "noncopyable.h" //This is for solving big symmetric positive definite linear problems. -float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), float *b, int n, bool OkToModify_b = true, float *x = NULL, float RMSResidual = 0.0f, void *Pass = NULL, int MaximumIterates = 0, void Preconditioner(float *Product, float *x, void *Pass) = NULL); +float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), float *b, int n, bool OkToModify_b = true, float *x = nullptr, float RMSResidual = 0.0f, void *Pass = nullptr, int MaximumIterates = 0, void Preconditioner(float *Product, float *x, void *Pass) = nullptr); //Storage and use class for symmetric matrices, the nonzero contents of which are confined to diagonals. -class MultiDiagonalSymmetricMatrix +class MultiDiagonalSymmetricMatrix : + public rtengine::NonCopyable { public: MultiDiagonalSymmetricMatrix(int Dimension, int NumberOfDiagonalsInLowerTriangle); @@ -90,7 +93,7 @@ public: */ float **Diagonals; char *buffer; - char *DiagBuffer; + float *DiagBuffer; int *StartRows; bool CreateDiagonal(int index, int StartRow); int n, m; //The matrix is n x n, with m diagonals on the lower triangle. Don't change these. They should be private but aren't for convenience. @@ -131,7 +134,8 @@ public: }; -class EdgePreservingDecomposition +class EdgePreservingDecomposition : + public rtengine::NonCopyable { public: EdgePreservingDecomposition(int width, int height); @@ -139,16 +143,16 @@ public: //Create an edge preserving blur of Source. Will create and return, or fill into Blur if not NULL. In place not ok. //If UseBlurForEdgeStop is true, supplied not NULL Blur is used to calculate the edge stopping function instead of Source. - float *CreateBlur(float *Source, float Scale, float EdgeStopping, int Iterates, float *Blur = NULL, bool UseBlurForEdgeStop = false); + float *CreateBlur(float *Source, float Scale, float EdgeStopping, int Iterates, float *Blur = nullptr, bool UseBlurForEdgeStop = false); //Iterates CreateBlur such that the smoothness term approaches a specific norm via iteratively reweighted least squares. In place not ok. - float *CreateIteratedBlur(float *Source, float Scale, float EdgeStopping, int Iterates, int Reweightings, float *Blur = NULL); + float *CreateIteratedBlur(float *Source, float Scale, float EdgeStopping, int Iterates, int Reweightings, float *Blur = nullptr); /*Lowers global contrast while preserving or boosting local contrast. Can fill into Compressed. The smaller Compression the more compression is applied, with Compression = 1 giving no effect and above 1 the opposite effect. You can totally use Compression = 1 and play with DetailBoost for some really sweet unsharp masking. If working on luma/grey, consider giving it a logarithm. In place calculation to save memory (Source == Compressed) is totally ok. Reweightings > 0 invokes CreateIteratedBlur instead of CreateBlur. */ - float *CompressDynamicRange(float *Source, float Scale = 1.0f, float EdgeStopping = 1.4f, float CompressionExponent = 0.8f, float DetailBoost = 0.1f, int Iterates = 20, int Reweightings = 0, float *Compressed = NULL); + float *CompressDynamicRange(float *Source, float Scale = 1.0f, float EdgeStopping = 1.4f, float CompressionExponent = 0.8f, float DetailBoost = 0.1f, int Iterates = 20, int Reweightings = 0, float *Compressed = nullptr); private: MultiDiagonalSymmetricMatrix *A; //The equations are simple enough to not mandate a matrix class, but fast solution NEEDS a complicated preconditioner. diff --git a/rtengine/FTblockDN.cc b/rtengine/FTblockDN.cc index ba7ae693e..6bb0c4c3c 100644 --- a/rtengine/FTblockDN.cc +++ b/rtengine/FTblockDN.cc @@ -37,6 +37,7 @@ #include "opthelper.h" #include "cplx_wavelet_dec.h" #include "median.h" +#include "iccstore.h" #ifdef _OPENMP #include #endif @@ -108,7 +109,7 @@ void ImProcFunctions::Median_Denoise(float **src, float **dst, const int width, medBuffer[0] = src; // we need a buffer if src == dst or if (src != dst && iterations > 1) - if (src == dst || (src != dst && iterations > 1)) { + if (src == dst || iterations > 1) { if (buffer == nullptr) { // we didn't get a buufer => create one allocBuffer = new float*[height]; @@ -853,7 +854,7 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagef const float noisevarab_b = SQR(realblue); //input L channel - array2D *Lin; + array2D *Lin = nullptr; //wavelet denoised image LabImage * labdn = new LabImage(width, height); @@ -1677,10 +1678,7 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagef } delete labdn; - - if (denoiseLuminance) { - delete Lin; - } + delete Lin; }//end of tile row }//end of tile loop @@ -2250,7 +2248,6 @@ SSEFUNCTION bool ImProcFunctions::WaveletDenoiseAll_BiShrinkL(wavelet_decomposit float ** WavCoeffs_L = WaveletCoeffs_L.level_coeffs(lvl); if (lvl == maxlvl - 1) { - float vari[4]; int edge = 0; ShrinkAllL(WaveletCoeffs_L, buffer, lvl, dir, noisevarlum, madL[lvl], nullptr, edge); } else { @@ -2613,7 +2610,7 @@ SSEFUNCTION void ImProcFunctions::ShrinkAllL(wavelet_decomposition &WaveletCoeff // printf("OK lev=%d\n",level); float mad_L = madL[dir - 1] ; - if (edge == 1) { + if (edge == 1 && vari) { noisevarlum = blurBuffer; // we need one buffer, but fortunately we don't have to allocate a new one because we can use blurBuffer for (int i = 0; i < W_L * H_L; ++i) { @@ -3044,7 +3041,7 @@ void ImProcFunctions::calcautodn_info (float &chaut, float &delta, int Nb, int l delta *= 0.15f; } else if (chaut < 650.f) { delta *= 0.1f; - } else if (chaut >= 650.f) { + } else /*if (chaut >= 650.f)*/ { delta *= 0.07f; } @@ -3082,7 +3079,7 @@ void ImProcFunctions::calcautodn_info (float &chaut, float &delta, int Nb, int l delta *= 0.3f; } else if (chaut < 650.f) { delta *= 0.2f; - } else if (chaut >= 650.f) { + } else /*if (chaut >= 650.f)*/ { delta *= 0.15f; } @@ -3107,7 +3104,7 @@ void ImProcFunctions::calcautodn_info (float &chaut, float &delta, int Nb, int l } -SSEFUNCTION void ImProcFunctions::RGB_denoise_info(Imagefloat * src, Imagefloat * provicalc, const bool isRAW, LUTf &gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float &minblueaut, float &nresi, float &highresi, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, bool multiThread) +SSEFUNCTION void ImProcFunctions::RGB_denoise_info(Imagefloat * src, Imagefloat * provicalc, const bool isRAW, LUTf &gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float &minblueaut, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, bool multiThread) { if ((settings->leveldnautsimpl == 1 && dnparams.Cmethod == "MAN") || (settings->leveldnautsimpl == 0 && dnparams.C2method == "MANU")) { //nothing to do @@ -3546,9 +3543,6 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise_info(Imagefloat * src, Imagefloat } comptlevel += 1; - float chresid, chmaxredresid, chmaxblueresid; - nresi = chresid; - highresi = chresid + 0.66f * (max(chmaxredresid, chmaxblueresid) - chresid); //evaluate sigma delete adecomp; delete bdecomp; delete labdn; diff --git a/rtengine/LUT.h b/rtengine/LUT.h index 24f883766..d83a431ca 100644 --- a/rtengine/LUT.h +++ b/rtengine/LUT.h @@ -61,13 +61,16 @@ #include #include +#include + #ifndef NDEBUG #include #include #endif + #include "opthelper.h" -#include #include "rt_math.h" +#include "noncopyable.h" // Bit representations of flags enum { @@ -85,7 +88,8 @@ using LUTd = LUT; using LUTuc = LUT; template -class LUT +class LUT : + public rtengine::NonCopyable { protected: // list of variables ordered to improve cache speed @@ -532,6 +536,8 @@ public: size = 0; upperBound = 0; maxs = 0; + maxsf = 0.f; + clip = 0; } // create an identity LUT (LUT(x) = x) or a scaled identity LUT (LUT(x) = x / divisor) diff --git a/rtengine/PF_correct_RT.cc b/rtengine/PF_correct_RT.cc index 6864e28ec..6808fd4eb 100644 --- a/rtengine/PF_correct_RT.cc +++ b/rtengine/PF_correct_RT.cc @@ -47,7 +47,7 @@ SSEFUNCTION void ImProcFunctions::PF_correct_RT(LabImage * src, LabImage * dst, { const int halfwin = ceil(2 * radius) + 1; - FlatCurve* chCurve = NULL; + FlatCurve* chCurve = nullptr; if (params->defringe.huecurve.size() && FlatCurveType(params->defringe.huecurve.at(0)) > FCT_Linear) { chCurve = new FlatCurve(params->defringe.huecurve); @@ -289,7 +289,7 @@ SSEFUNCTION void ImProcFunctions::PF_correct_RTcam(CieImage * src, CieImage * ds { const int halfwin = ceil(2 * radius) + 1; - FlatCurve* chCurve = NULL; + FlatCurve* chCurve = nullptr; if (params->defringe.huecurve.size() && FlatCurveType(params->defringe.huecurve.at(0)) > FCT_Linear) { chCurve = new FlatCurve(params->defringe.huecurve); diff --git a/rtengine/StopWatch.h b/rtengine/StopWatch.h index 2b3ff1baf..9e4400b94 100644 --- a/rtengine/StopWatch.h +++ b/rtengine/StopWatch.h @@ -26,18 +26,17 @@ #ifdef BENCHMARK #define BENCHFUN StopWatch StopFun(__func__); + #define BENCHFUNMICRO StopWatch StopFun(__func__, true); #else #define BENCHFUN + #define BENCHFUNMICRO #endif class StopWatch { public: - StopWatch( ) - { - stopped = false; - } - StopWatch( const char* msg) + + explicit StopWatch( const char* msg, bool microseconds = false ) : microseconds(microseconds) { message = msg; start(); @@ -56,8 +55,13 @@ public: void stop() { stopTime.set(); - long elapsedTime = stopTime.etime(startTime) / 1000; - std::cout << message << " took " << elapsedTime << " ms" << std::endl; + if(!microseconds) { + long elapsedTime = stopTime.etime(startTime) / 1000; + std::cout << message << " took " << elapsedTime << " ms" << std::endl; + } else { + long elapsedTime = stopTime.etime(startTime); + std::cout << message << " took " << elapsedTime << " us" << std::endl; + } stopped = true; } void stop(const char *msg) @@ -66,6 +70,7 @@ public: stop(); }; private: + bool microseconds; MyTime startTime; MyTime stopTime; const char *message; diff --git a/rtengine/alignedbuffer.h b/rtengine/alignedbuffer.h index ac8471b7e..44fd43e81 100644 --- a/rtengine/alignedbuffer.h +++ b/rtengine/alignedbuffer.h @@ -43,7 +43,7 @@ public: * @param size Number of elements of size T to allocate, i.e. allocated size will be sizeof(T)*size ; set it to 0 if you want to defer the allocation * @param align Expressed in bytes; SSE instructions need 128 bits alignment, which mean 16 bytes, which is the default value */ - AlignedBuffer (size_t size = 0, size_t align = 16) : real(NULL), alignment(align), allocatedSize(0), unitSize(0), data(NULL), inUse(false) + AlignedBuffer (size_t size = 0, size_t align = 16) : real(nullptr), alignment(align), allocatedSize(0), unitSize(0), data(nullptr), inUse(false) { if (size) { resize(size); @@ -78,8 +78,8 @@ public: free(real); } - real = NULL; - data = NULL; + real = nullptr; + data = nullptr; inUse = false; allocatedSize = 0; unitSize = 0; @@ -93,7 +93,15 @@ public: // we're freeing the memory and allocate it again if the new size is bigger. if (allocatedSize < oldAllocatedSize) { - real = realloc(real, allocatedSize + alignment); + void *temp = realloc(real, allocatedSize + alignment); + if (temp) { // realloc succeeded + real = temp; + } else { // realloc failed => free old buffer and allocate new one + if (real) { + free (real); + } + real = malloc(allocatedSize + alignment); + } } else { if (real) { free (real); @@ -109,7 +117,7 @@ public: } else { allocatedSize = 0; unitSize = 0; - data = NULL; + data = nullptr; inUse = false; return false; } @@ -143,7 +151,7 @@ private: size_t size; public: - AlignedBufferMP(size_t sizeP) + explicit AlignedBufferMP(size_t sizeP) { size = sizeP; } diff --git a/rtengine/array2D.h b/rtengine/array2D.h index f9d92ac36..2fe4ecad4 100644 --- a/rtengine/array2D.h +++ b/rtengine/array2D.h @@ -66,12 +66,16 @@ #include #include +#include "noncopyable.h" + template -class array2D +class array2D : + public rtengine::NonCopyable { private: - int x, y, owner, flags; + int x, y, owner; + unsigned int flags; T ** ptr; T * data; bool lock; // useful lock to ensure data is not changed anymore. @@ -79,19 +83,19 @@ private: { if ((ptr) && ((h > y) || (4 * h < y))) { delete[] ptr; - ptr = NULL; + ptr = nullptr; } if ((data) && (((h * w) > (x * y)) || ((h * w) < ((x * y) / 4)))) { delete[] data; - data = NULL; + data = nullptr; } - if (ptr == NULL) { + if (ptr == nullptr) { ptr = new T*[h]; } - if (data == NULL) { + if (data == nullptr) { data = new T[h * w + offset]; } @@ -109,7 +113,7 @@ public: // use as empty declaration, resize before use! // very useful as a member object array2D() : - x(0), y(0), owner(0), ptr(NULL), data(NULL), lock(0) + x(0), y(0), owner(0), ptr(nullptr), data(nullptr), lock(0), flags(0) { //printf("got empty array2D init\n"); } @@ -147,7 +151,7 @@ public: if (owner) { data = new T[h * w]; } else { - data = NULL; + data = nullptr; } x = w; @@ -188,12 +192,12 @@ public: { if ((owner) && (data)) { delete[] data; - data = NULL; + data = nullptr; } if (ptr) { delete [] ptr; - ptr = NULL; + ptr = nullptr; } } @@ -282,6 +286,8 @@ public: if (this != &rhs) { + flags = rhs.flags; + lock = rhs.lock; if (!owner) { // we can only copy same size data if ((x != rhs.x) || (y != rhs.y)) { printf(" assignment error in array2D\n"); diff --git a/rtengine/cache.h b/rtengine/cache.h index ea567542c..f4c232673 100644 --- a/rtengine/cache.h +++ b/rtengine/cache.h @@ -64,7 +64,7 @@ public: virtual void onDestroy() = 0; }; - Cache(unsigned long _size, Hook* _hook = 0) : + Cache(unsigned long _size, Hook* _hook = nullptr) : store_size(_size), hook(_hook) { diff --git a/rtengine/camconst.cc b/rtengine/camconst.cc index c7a6412be..5a155e051 100644 --- a/rtengine/camconst.cc +++ b/rtengine/camconst.cc @@ -41,7 +41,7 @@ CameraConst::parseApertureScaling(CameraConst *cc, void *ji_) return false; } - for (ji = ji->child; ji != NULL; ji = ji->next) { + for (ji = ji->child; ji != nullptr; ji = ji->next) { cJSON *js = cJSON_GetObjectItem(ji, "aperture"); if (!js) { @@ -90,7 +90,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) int i; cJSON *js; - for (js = ji->child, i = 0; js != NULL && i < 4; js = js->next, i++) { + for (js = ji->child, i = 0; js != nullptr && i < 4; js = js->next, i++) { lvl.levels[i] = js->valueint; } @@ -98,7 +98,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) lvl.levels[3] = lvl.levels[1]; // G2 = G1 } else if (i == 1) { lvl.levels[3] = lvl.levels[2] = lvl.levels[1] = lvl.levels[0]; - } else if (i != 4 || js != NULL) { + } else if (i != 4 || js != nullptr) { fprintf(stderr, "\"ranges\":\"%s\" array must have 1, 3 or 4 numbers.\n", bw ? "white" : "black"); return false; } @@ -107,7 +107,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) return true; } - for (ji = ji->child; ji != NULL; ji = ji->next) { + for (ji = ji->child; ji != nullptr; ji = ji->next) { int iso[1000] = { 0 }; int iso_count = 0; cJSON *js = cJSON_GetObjectItem(ji, "iso"); @@ -121,7 +121,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) } else if (js->type == cJSON_Array) { int i; - for (js = js->child, i = 0; js != NULL && i < 1000; js = js->next, i++) { + for (js = js->child, i = 0; js != nullptr && i < 1000; js = js->next, i++) { if (js->type != cJSON_Number) { fprintf(stderr, "\"ranges\":\"%s\":\"iso\" must be a number or an array of numbers.\n", bw ? "white" : "black"); return false; @@ -150,7 +150,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) } else if (js->type == cJSON_Array) { int i; - for (js = js->child, i = 0; js != NULL && i < 4; js = js->next, i++) { + for (js = js->child, i = 0; js != nullptr && i < 4; js = js->next, i++) { if (js->type != cJSON_Number) { fprintf(stderr, "\"ranges\":\"%s\":\"levels\" must be a number or an array of numbers.\n", bw ? "white" : "black"); return false; @@ -163,7 +163,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) lvl.levels[3] = lvl.levels[1]; // G2 = G1 } else if (i == 1) { lvl.levels[3] = lvl.levels[2] = lvl.levels[1] = lvl.levels[0]; - } else if (i != 4 || js != NULL) { + } else if (i != 4 || js != nullptr) { fprintf(stderr, "\"ranges\":\"%s\":\"levels\" array must have 1, 3 or 4 numbers.\n", bw ? "white" : "black"); return false; } @@ -183,7 +183,7 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) CameraConst * CameraConst::parseEntry(void *cJSON_, const char *make_model) { - CameraConst *cc = 0; + CameraConst *cc = nullptr; cJSON *js, *ji, *jranges; js = (cJSON *)cJSON_; @@ -200,7 +200,7 @@ CameraConst::parseEntry(void *cJSON_, const char *make_model) int i; - for (i = 0, ji = ji->child; i < 12 && ji != NULL; i++, ji = ji->next) { + for (i = 0, ji = ji->child; i < 12 && ji != nullptr; i++, ji = ji->next) { if (ji->type != cJSON_Number) { fprintf(stderr, "\"dcraw_matrix\" array must contain numbers\n"); goto parse_error; @@ -220,7 +220,7 @@ CameraConst::parseEntry(void *cJSON_, const char *make_model) int i; - for (i = 0, ji = ji->child; i < 4 && ji != NULL; i++, ji = ji->next) { + for (i = 0, ji = ji->child; i < 4 && ji != nullptr; i++, ji = ji->next) { if (ji->type != cJSON_Number) { fprintf(stderr, "\"raw_crop\" array must contain numbers\n"); goto parse_error; @@ -229,7 +229,7 @@ CameraConst::parseEntry(void *cJSON_, const char *make_model) cc->raw_crop[i] = ji->valueint; } - if (i != 4 || ji != NULL) { + if (i != 4 || ji != nullptr) { fprintf(stderr, "\"raw_crop\" must contain 4 numbers\n"); goto parse_error; } @@ -245,7 +245,7 @@ CameraConst::parseEntry(void *cJSON_, const char *make_model) int i; - for (i = 0, ji = ji->child; i < 8 * 4 && ji != NULL; i++, ji = ji->next) { + for (i = 0, ji = ji->child; i < 8 * 4 && ji != nullptr; i++, ji = ji->next) { if (ji->type != cJSON_Number) { fprintf(stderr, "\"masked_areas\" array must contain numbers\n"); goto parse_error; @@ -317,11 +317,11 @@ CameraConst::parseEntry(void *cJSON_, const char *make_model) return cc; parse_error: - return 0; + return nullptr; } bool -CameraConst::has_dcrawMatrix(void) +CameraConst::has_dcrawMatrix() { return dcraw_matrix[0] != 0; } @@ -339,17 +339,17 @@ CameraConst::update_dcrawMatrix(const short *other) } const short * -CameraConst::get_dcrawMatrix(void) +CameraConst::get_dcrawMatrix() { if (!has_dcrawMatrix()) { - return 0; + return nullptr; } return dcraw_matrix; } bool -CameraConst::has_rawCrop(void) +CameraConst::has_rawCrop() { return raw_crop[0] != 0 || raw_crop[1] != 0 || raw_crop[2] != 0 || raw_crop[3] != 0; } @@ -545,7 +545,7 @@ CameraConstantsStore::parse_camera_constants_file(Glib::ustring filename_) const char *filename = filename_.c_str(); FILE *stream = fopen(filename, "rt"); - if (stream == NULL) { + if (stream == nullptr) { fprintf(stderr, "Could not open camera constants file \"%s\": %s\n", filename, strerror(errno)); return false; } @@ -558,10 +558,20 @@ CameraConstantsStore::parse_camera_constants_file(Glib::ustring filename_) while ((ret = fread(&buf[datasize], 1, bufsize - datasize, stream)) != 0) { datasize += ret; - if (datasize == bufsize) { + if (datasize == bufsize) { // we need more memory bufsize += increment; - buf = (char *)realloc(buf, bufsize); - increment *= 2; + void *temp = realloc(buf, bufsize); // try to realloc buffer with new size + if(!temp) { // realloc failed + temp = malloc(bufsize); // alloc now buffer + if (temp) { // alloc worked + memcpy(temp, buf, bufsize - increment); // copy old buffer content to new buffer + free(buf); // free old buffer + } else { // alloc didn't work, break + break; + } + } + buf = (char *)temp; // assign new buffer + increment *= 2; // double increment } } @@ -614,7 +624,7 @@ CameraConstantsStore::parse_camera_constants_file(Glib::ustring filename_) goto parse_error; } - for (js = js->child; js != NULL; js = js->next) { + for (js = js->child; js != nullptr; js = js->next) { cJSON *ji = cJSON_GetObjectItem(js, "make_model"); if (!ji) { @@ -629,7 +639,7 @@ CameraConstantsStore::parse_camera_constants_file(Glib::ustring filename_) is_array = true; } - while (ji != NULL) { + while (ji != nullptr) { if (ji->type != cJSON_String) { fprintf(stderr, "\"make_model\" must be a string or an array of strings\n"); goto parse_error; @@ -667,7 +677,7 @@ CameraConstantsStore::parse_camera_constants_file(Glib::ustring filename_) if (is_array) { ji = ji->next; } else { - ji = NULL; + ji = nullptr; } } } @@ -698,7 +708,7 @@ void CameraConstantsStore::init(Glib::ustring baseDir, Glib::ustring userSetting } CameraConstantsStore * -CameraConstantsStore::getInstance(void) +CameraConstantsStore::getInstance() { static CameraConstantsStore instance_; return &instance_; @@ -715,7 +725,7 @@ CameraConstantsStore::get(const char make[], const char model[]) it = mCameraConstants.find(key); if (it == mCameraConstants.end()) { - return 0; + return nullptr; } return it->second; diff --git a/rtengine/camconst.json b/rtengine/camconst.json index cf3e976ce..7ddcefaba 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -1,105 +1,96 @@ /* - DO NOT EDIT THIS FILE! +DO NOT EDIT THIS FILE! - All changes made here will be lost on software update. - If you want to add custom values or changes existing ones, - create a "camconst.json" file next to your personal "options" file. - Its values will then override and/or complete the ones of this file. +All changes made here will be lost on software update. If you want to add custom values or change existing ones, create +a "camconst.json" file next to your personal "options" file. Its values will then override and/or complete the ones of +this file. - If you add values for your own camera and are okay to share them with - RawTherapee's community, please drop a link on the user's forum +If you add values for your own camera, consider sharing them with the community for everyone's benefit. You can do so +via our forum or GitHub page: +- https://discuss.pixls.us/c/software/rawtherapee +- https://github.com/Beep6581/RawTherapee/issues - IMPORTANT: - ---------- +Value priority: +1. If you set the dcraw matrix in your user camconst.json file for a camera entry which already exists in RT's file + (same camera, same model), your values will replace RT's ones. +2. If you set the black level values in your user camconst.json file for a camera entry which already exists in RT's + file, your values will replace RT's ones, even if RT's ones are more complete and/or detailed. You might want to + copy/paste RT's levels first (if provided) to your user's file and complete/modify them. +3. Same for the white levels, independent of the black levels. - 1. If you set the dcraw matrix in your user file for an already existing entry - in RT's file (same camera, same model), your values will replace RT's ones. - 2. If you set the Black level(s) values in your user file for an already existing - entry in RT's file, your values will replace RT's ones, even if RT's ones are - more complete and/or detailed. You might want to copy/paste RT's levels first - (if provided) to your user's file and complete/modify it. +This file is in JSON format and contains camera constants which RawTherapee uses when parsing raw files. - Same for the White level(s), independently from the Black level(s). +Raw files themselves unfortunately do not contain all information needed for making a raw conversion. Typically color +response information and black/white levels are missing. That's why this file is needed. +This file is read once during startup, so if the file is updated you need to restart RawTherapee in order for changes to +take effect. The file is not intended for modification by the casual user, but advanced users can add missing camera +information to this file. If you do so, please report using the links above so that we can incorporate your changes for +everyone's benefit. ----------------------------------------------------------------------------------- +RawTherapee uses dcraw as the raw format parser. dcraw contains hard-coded camera constants, but not for all cameras, +and the values are not always accurate. For example dcraw only supports one white level, while some cameras have +different white levels per channel and per ISO. If a camera is not listed in this file the constants from dcraw will be +used. If listed here this information will override the constants in dcraw (if any). - -This file is in JSON format and contains camera constants which RawTherapee uses -when parsing raw files. - -Raw files themselves unfortunately do not contain all information needed for making -a raw conversion, typically color response information and black/white levels are -missing. That's why this file is needed. - -It's read once during startup, so if the file is updated you need to restart -RawTherapee in order to take effect. The file is not intended for modification by -the casual user, but advanced users can add missing camera information to this file. -If you do so please report at https://github.com/Beep6581/RawTherapee/issues so we can -extend the distributed version of this file so your provided camera information -becomes available to all. - -RawTherapee uses DCRAW as the raw format parser. DCRAW contains hard-coded camera -constants, but not for all cameras and not always accurate information. For example -DCRAW only support one white level, while some cameras have different white levels -per channel and per ISO. If a camera is not listed in this file the constants from -DCRAW will be used, if listed here this information will override any constants in -DCRAW (if any). - -Some cameras may only have partial information here, for example if the raw file -itself contains a color matrix it's not entered here. A camera whose black level -is measured on special pixels in the raw file should only have white levels here -etc. +Partial information is supported. For example if the raw file itself contains a color matrix then there is no need to +enter it here. A camera whose black level is measured on special pixels in the raw file should only have white levels +here. And so forth. Examples: { - // make and model separated with single space, must match make - // and model as provided by dcraw (case-insensitive). + // Make and model separated with single space, must match make and model as provided by dcraw (case-insensitive): "make_model": "ManufacturerA ModelB", - Some Panasonics and some Canon Dslrs (of the low category like Canon 550D) exist - under alternate naming in various marketplaces (EOS 550D, EOS Rebel T2i, EOS Kiss X4). - For new models that are still not supported by the Dcraw version used in current RT, - we have to fill all the alternate names or else RT will not recognize the alternate model names - For models supported by Dcraw, filling the alternate names is simply desired (for better user info). - The format of multiple naming is to write all names in brackets i.e - instead of .. "make_model": "Canon EOS 550D", - type .. "make_model": [ "Canon EOS 550D", "Canon EOS Rebel T2i", "Canon EOS Kiss X4" ], - // ColorMatrix with D65 Calibration Illuminant, in dcraw format + // Some Panasonic and Canon DSLRs (of the lower category, such as Canon 550D) exist/ under alternate naming in + // various marketplaces (EOS 550D, EOS Rebel T2i, EOS Kiss X4). + // For new models that are still not supported by the dcraw version used in current RT, we have to fill all the + // alternate names or else RT will not recognize the alternate model names. + // For models supported by dcraw, filling the alternate names is simply desired (for better user info). + // The format of multiple naming is to write all names in brackets i.e instead of + // "make_model": "Canon EOS 550D", + // type + // "make_model": [ "Canon EOS 550D", "Canon EOS Rebel T2i", "Canon EOS Kiss X4" ], + + // ColorMatrix with CIE Standard Illuminant D65, in dcraw format: "dcraw_matrix": [ 7530, -1942, -255, -4318, 11390, 3362, -926, 1694, 7649 ], - // black level (or black offset if a base black is already extracted from exif by Dcraw, see Panasonic, resent Nikon ) - // For some rare cases where Dcraw detects wrong Black Level we need to correct it with absolute black i.e one that is not added up - // the detected. For this job we have to define "black" as 65535+desired_black. For example to correct a wrongly detected black level - of 9 instead of the correct 600 we define "black": 66135 i.e. 65535+600. - // and white level same for all colors at all ISOs + + // Black level (or black offset if a base black is already extracted from Exif by dcraw, see Panasonic, + // recent Nikon). For some rare cases where dcraw detects wrong black level we need to correct it with + // absolute black i.e one that is not added up the detected. For this job we have to define "black" as + // 65535+desired_black. For example to correct a wrongly detected black level of 9 instead of the correct + // 600 we define "black": 66135, i.e. 65535+600, and white level same for all colors at all ISOs. "ranges": { "black": 10, "white": 1000 }, - // crop away masked sensor borders, 10 pixels left, 20 pixels top, resulting image width/height 4000x3000 - // instead of width/height you can write a negative number which specifies how much of right/bottom border - that should be removed but keep in mind that sometimes after converting to DNG the borders are already - cropped so the "negative number" way is not totally safe. - "raw_crop": [ 10, 20, 4000, 3000 ], - // Almost same as MaskedAreas DNG tag, used for black level measuring. Here up to two areas can be defined - by tetrads of numbers - "masked_areas": [ 51, 2, 3804, 156, 51, 5794, 3804, 5792 ], // two tetrads define two areas - The difference vs "raw_crop" is the meaning of the numbers which here are expressing the absolute distance (in pixels) - of each side of each rectangular "masked area" from the top and left side of the sensor - - the first number is the distance of the top edge from the sensor's top - - the second is the distance of the left side from the sensor's left - - the third is the distance of the bottom side from the sensor's top - - the fourth is the distance of the right side from the sensor's left - It is useful after detecting the masked areas, to not fully use these areas but leave a border of - 2-4 pixels instead, to take care of possible light leaks from the light sensing area to the optically - black (masked) area or sensor imperfections at the outer borders. + + // Crop away masked sensor borders, 10 pixels left, 20 pixels top, resulting image width/height 4000x3000. + // Instead of width/height you can write a negative number which specifies how much of right/bottom border + // that should be removed but keep in mind that sometimes after converting to DNG the borders are already + // cropped so the "negative number" way is not totally safe. + "raw_crop": [ 10, 20, 4000, 3000 ], + + // Almost same as MaskedAreas DNG tag, used for black level measuring. Here up to two areas can be defined + // by tetrads of numbers: + "masked_areas": [ 51, 2, 3804, 156, 51, 5794, 3804, 5792 ], + // Two tetrads define two areas. The difference vs "raw_crop" is the meaning of the numbers which here are + // expressing the absolute distance (in pixels) of each side of each rectangular "masked area" from the top + // and left side of the sensor + // - the first number is the distance of the top edge from the sensor's top + // - the second is the distance of the left side from the sensor's left + // - the third is the distance of the bottom side from the sensor's top + // - the fourth is the distance of the right side from the sensor's left + // It is useful after detecting the masked areas, to not fully use these areas but leave a border of 2-4 pixels + // instead, to take care of possible light leaks from the light sensing area to the optically black (masked) + // area or sensor imperfections at the outer borders. }, { "make_model": "ManufacturerA ModelB", "dcraw_matrix": [ 7530,-1942,-255,-4318,11390,3362,-926,1694,7649 ], - // black and white levels per ISO per channel - // this example only two ISOs, normally the list should be more populated. - // When RawTherapee asks for black/white levels for a specific ISO the closest - // match is picked. + + // Black and white levels per ISO per channel. + // In this example there are only two ISOs - normally the list should be more populated. + // When RawTherapee asks for black/white levels for a specific ISO the closest match is picked. "ranges": { "black": [ { "iso": 100, "levels": 10 }, // here only one level, same level for all channels @@ -112,286 +103,212 @@ Examples: } } -How to measure white levels: + +How to Measure White Levels: ---------------------------- -Dcraw which provides the default values to RawTherapee often provides too high -white levels, and only provides a single value regardless of color channel, ISO -or aperture. If you open an image with a large clipped area and that is -rendered in a pink/magenta color rather than white it usually means that the -white level constant is too high. You can fix this by adjusting the -"Raw White Point" in the raw tab inside RawTherapee, or permanently fix it by -measuring and providing a more exact white level in camconst.json so -RawTherapee gets to know from start where the camera actually clips. + dcraw provides the default values used by RawTherapee, but often provides too high white levels, and only provides a + single value regardless of color channel, ISO or aperture. If you open an image with a large clipped area and that + is rendered in a pink/magenta color rather than white it usually means that the white level constant is too high. You can + fix this by adjusting the"Raw White Point" in the raw tab inside RawTherapee, or permanently fix it by measuring and + providing a more exact white level in camconst.json so RawTherapee gets to know from start where the camera actually + clips. Providing a complete and detailed white-level profile can be a quite large and complicated effort. As an + alternative you can provide a simpler profile.We suggest one of the following alternatives in rising difficulty + (and generally diminishing return): + A) Provide a single white-level value measured on the native ISO (base ISO). For many cameras this will actually be + complete information, those that don't vary on channel, ISO or aperture. + B) Check through all ISOs and if there are differences in white level provide an array with white level per ISO. + C) In addition to ISO, check for aperture scaling and add that. + D) In addition to ISO and aperture scaling check for color channel differences and add that. -Providing a complete and detailed white-level profile can be a quite large -and complicated effort. As an alternative you can provide a simpler profile. -We suggest one of the following alternatives in rising difficulty (and -generally diminishing return): + Doing A is often better than nothing, as dcraw's default is often too high.B can also be worthwhile for some cameras (or + else you'll get pink highlights for some ISOs), while C and D can generally be seen as fine-tuning. -A) Provide a single white-level value measured on the native ISO (base ISO). - For many cameras this will actually be complete information, those that - don't vary on channel, ISO or aperture. -B) Check through all ISOs and if there are differences in white level provide - an array with white level per ISO. -C) In addition to ISO, check for aperture scaling and add that. -D) In addition to ISO and aperture scaling check for color channel - differences and add that. + Here follows a guide how to measure white levels (clipping levels): -Doing A) is often better than nothing, as dcraw's default is often too high. -B) can also be worthwhile for some cameras (or else you'll get pink highlights -for some ISOs), while C) and D) can generally be seen as fine-tuning. + Shoot with your camera into a bright light source, such as a lamp, and make sure the shutter speed is long enough to get + overexposure (we want clipping!). Preferably overexpose lightly, say 1 or 2 stops if you can. The reason for this is that + some cameras with fuzzy white levels may look less fuzzy than they actually are if over-exposure is heavy. -Here follows a guide how to measure white levels (clipping levels): + Use f/5.6 or smaller aperture (=larger f-number) to avoid any raw scaling the camera might have for large apertures. -Shoot with your camera into a bright light source, such as a lamp, and make -sure the shutter speed is long enough to get overexposure (we want -clipping!). Preferably overexpose lightly, say 1 or 2 stops if you can. The -reason for this is that some cameras with fuzzy white levels may look less -fuzzy than they actually are if over-exposure is heavy. + Open the file in a raw analyzer such as RawDigger and check the pixel values for the clipped areas (if you are using + RawDigger, make sure you have disabled"subtract black" in preferences or else sample values can be wrong). In + this stage we always look at white level before black level subtraction! White levels can be different on color + channel (R, G1, B, G2, note the two greens, most often both green channels have the same white level though) and + vary depending on ISO setting, so if you want to provide a complete profile make one shoot for each ISO (even 1/3 + steps, so yes it can be quite a lot of pictures to shoot and check). -Use f/5.6 or smaller aperture (=larger f-number) to avoid any raw scaling -the camera might have for large apertures. + In addition, many cameras scale the raw values for large apertures. It's generally not that important to cover this, but + if you want to extract most out of the camera you should cover this too. Then you need to shoot with a wide aperture + lens (ideally the widest available from the manufacturer) and test each aperture (1/3 steps) from the widest (say f/1.2) + until the camera stops scaling the raw values (usually f/2.8 or f/4.0). If the camera also have ISO scaling you need to + shoot at these different ISOs to detect any differences in scaling, there can be a bit of variation. If you don't have + access to the widest lens available for the system (say only an f/1.8 lens instead of an f/1.2) it can still be valuable + to have the values down to what you can provide. Brands known to have models that have aperture scaling of white levels + include Canon and Nikon. Note that if white levels are not scaled the camera may have raw scaling anyway (Sony for + example), but as such scaling will not affect raw decoding we don't need to care about that. -Open the file in a raw analyzer such as Rawdigger and check the pixel values -for the clipped areas (if you are using Rawdigger, make sure you have disabled -"subtract black" in preferences or else sample values can be wrong). In this -stage we always look at white level before black level subtraction! White -levels can be different on color channel (R, G1, B, G2, note the two greens, -most often both green channels have the same white level though) and vary -depending on ISO setting, so if you want to provide a complete profile make -one shoot for each ISO (even 1/3 steps, so yes it can be quite a lot of -pictures to shoot and check). + PROVIDE CONSERVATIVE VALUES. Most cameras have a little noise at the white level, and some can have a lot. In your raw + analyzer, move around and look at the values in the clipped areas to get a sense of the variation, and/or look at the + histogram. While it's common to with very little variation, say only +/-2 units, some can have +/-500 or more (some may + have different variation depending on ISO). There can also be camera-to-camera variation. -In addition, many cameras scale the raw values for large apertures. It's -generally not that important to cover this, but if you want to extract most -out of the camera you should cover this too. Then you need to shoot with a -wide aperture lens (ideally the widest available from the manufacturer) and -test each aperture (1/3 steps) from the widest (say f/1.2) until the camera -stops scaling the raw values (usually f/2.8 or f/4.0). If the camera also -have ISO scaling you need to shoot at these different ISOs to detect any -differences in scaling, there can be a bit of variation. If you don't have -access to the widest lens available for the system (say only an f/1.8 lens -instead of an f/1.2) it can still be valuable to have the values down to -what you can provide. Brands known to have models that have aperture scaling -of white levels include Canon and Nikon. Note that if white levels are not -scaled the camera may have raw scaling anyway (Sony for example), but as -such scaling will not affect raw decoding we don't need to care about that. + If the white level is set too high RawTherapee will not think the pixels are clipped and you can get discoloured + highlights (usually pink), this is what we want to avoid. If white level is set too low RawTherapee will clip early, ie + you lose a little highlight detail, but the color is rendered correctly and highlight reconstruction can work properly, + so this is not as bad. This is why we want conservative values. -PROVIDE CONSERVATIVE VALUES. Most cameras have a little noise at the white -level, and some can have a lot. In your raw analyzer, move around and look at -the values in the clipped areas to get a sense of the variation, and/or look -at the histogram. While it's common to with very little variation, say only -+/-2 units, some can have +/-500 or more (some may have different variation -depending on ISO). There can also be camera-to-camera variation. + By conservative values we mean that if you see a white level of most often 15760 and occasionally 15759 (i.e. very small + variation of white level which is a common case), you set the white level around 50-100 14-bit units below or + 10-20 12-bit units. Say at 15700 in this example, or 4080 instead of 4095 for 12-bit raws. This way we get a little margin + from noise and camera variation. Since sensor raw values are linear, you lose, for example, + log2(1-50/15760) = -0.005 stops of detail, i.e. irrelevant. Thus it is better to provide RawTherapee with knowledge + where the image clips rather than keeping that last 0.005 stop of highlight information and risking that clipping will + not be detected properly. -If the white level is set too high RawTherapee will not think the pixels are -clipped and you can get discoloured highlights (usually pink), this is what -we want to avoid. If white level is set too low RawTherapee will clip early, ie -you lose a little highlight detail, but the color is rendered correctly and -highlight reconstruction can work properly, so this is not as bad. This is why -we want conservative values. + It is very usual for white level to be a bell distribution instead of a candle when the camera applies long exposure + noise reduction (LENR) by subtracting a black frame and/or when the system is destabilized due to temperature. Some models have + always a bell distribution at WL. If you have a fuzzy white level look at the linear histogram; you will probably see a + normal/Gaussian distribution (bell shape) noise peak at clipping and probably also a peak at a hard raw data clip level + usually at or close to a power of two - 1, such as 4095 or 16383. Then you pick a value just before the bell shape + rises, i.e. to the left of the bell meaning that you cut away the whole fuzzy noise peak. If a little of the starting edge + of the noise will be included it's not harmful, but 99% of it should be above. This would mean that it's better to + measure white level on long exposure/high temp raws but since this if difficult and time consuming we choose to measure + on normal raws and cover the abnormalities with the conservative WL values. A more detailed approach when we only have + non-LENR measures is to subtract a value according to per ISO read noise. We can find data regarding read noise (stdev + of Gaussian distribution) at http://www.photonstophotos.net/Charts/RN_ADU.htm . We find the per ISO tead_noise and + subtract from the measured value 6*read_noise. This gives confidence that 99.5% of the bell is clipped out. -By conservative values we mean that if you see a white level of most often -15760 and occassionally 15759 (ie very small variation of white level which -is a common case), you set the white level around 50-100 14-bit units below or -10-20 12-bit units. Say at 15700 in this example, or 4080 instead of 4095 for -12-bit raws. This way we get a little margin from noise and camera variation. -Since sensor raw values are linear, you lose, for example, -log2(1-50/15760) = -0.005 stops of detail, i.e. irrelevant. Thus it is better -to provide RawTherapee with knowledge where the image clips rather than keeping -that last 0.005 stop of highlight information and risking that clipping will -not be detected properly. + If you have used Adobe's DNG Converter and analyzed it's output you may have noticed that it's very conservative + regarding white levels, i.e. it cuts away quite a lot from the top. While we also recommend to be conservative, you can + generally be a little bit less so than Adobe's DNG Converter. RawTherapee is meant to max out what you can get from your + camera, and the white levels should mirror that, within reason. -It is very usual for white level to be a bell distribution instead of a candle -when the camera applies long exposure noise reduction by subtracting a black frame -and/or when the system is destabilized due to temperature. Some models have -always a bell distribution at WL. -If you have a fuzzy white level look at the linear histogram; you will probably -see a normal/gaussian distribution (bell shape) noise peak at clipping and -probably also a peak at a hard raw data clip level usually at or close to a -power of two - 1, such as 4095 or 16383. Then you pick a value just before the -bell shape rises, ie to the left of the bell meaning that you cut away the -whole fuzzy noise peak. If a little of the starting edge of the noise will be -included it's not harmful, but 99% of it should be above. -This would mean that it's better to measure white level on long exposure/ high temp -raws but since this if difficult and time consuming we choose to measure on normal -raws and cover the abnormalities with the conservative WL values. - A more detailed approach when we only have non LENR measures is to subtract -a value according to per ISO read noise. -We can find data regarding read noise (stdev of gaussian distribution) at -http://www.photonstophotos.net/Charts/RN_ADU.htm . We find the per ISO tead_noise and -subtract from the measured value 6*read_noise. This gives confidence that 99.5% of -the bell is clipped out. + The aperture scaling feature is meant to raise the white level to not miss out on highlight detail when the camera has + scaled the raw values (and thus raised white levels). Many cameras do this, but not all, and can only do it for lenses + that report aperture to the camera (i.e. you see it in the Exif data). Providing proper aperture scaling values is a bit + more advanced task, so if you are unsure we recommend to skip that part. -If you have used Adobe's DNG Converter and analyzed it's output you may have -noticed that it's very conservative regarding white levels, ie it cuts away -quite a lot from the top. While we also recommend to be conservative, you can -generally be a little bit less so than Adobe's DNG Converter. RawTherapee is -meant to max out what you can get from your camera, and the white levels should -mirror that, within reason. + Beware that the raw format may have a ceiling so that it clips scaled values, for example the Canon 5D mark II maxes out + at 16383 which happens at f/1.8 for ISOs with the white level at 15750, but for ISO160 when the white level is 12800 it + does not max out. If there is such a raw limit it must also be provided ("ranges":"white_max"). Usually you will not + need a margin on white_max as it clips there as a result of an in-camera math operation. -The aperture scaling feature is meant to raise the white level to not miss out -on highlight detail when the camera has scaled the raw values (and thus -raised white levels). Many cameras do this, but not all, and can only do it -for lenses that report aperture to the camera (ie you see it in the EXIF -data). Providing proper aperture scaling values is a bit more advanced task, -so if you are unsure we recommend to skip that part. + Note that aperture scaling can be quite small, for the 5D mark II it's only 0.2 stop down to f/1.2 and then it can be + discussed if it's worthwhile to care. The "worst" cameras scale about 0.6 stops though, and then it's more valuable to + compensate. If you skip aperture scaling RawTherapee will clip the files a little bit too early and you miss that last + fraction of highlight detail, but you get no processing problems. Setting un-conservative scale factors can on the other + hand cause a too high white level and break highlight processing, so be careful. -Beware that the raw format may have a ceiling so that it clips scaled values, -for example the Canon 5D mark II maxes out at 16383 which happens at f/1.8 -for ISOs with the white level at 15750, but for ISO160 when the white level -is 12800 it does not max out. If there is such a raw limit it must also be -provided ("ranges":"white_max"). Usually you will not need a margin on -white_max as it clips there as a result of an in-camera math operation. + Scaling can vary slightly depending on ISO (if white levels vary) so make sure to provide conservative scalings so + regardless of ISO you don't get a too high white level. We recommend to keep a small margin here also white levels, + i.e. 0.5% lower or so. For example if base (not conservative!) white level is 15750 and the scaled is 16221 we have a + scaling factor of 16221/15750=1.0299 i.e. +2.9% we set the factor to 1.025 to keep a margin. The abnormal cases are + already covered by setting conservative per ISO White levels. -Note that aperture scaling can be quite small, for the 5D mark II it's only -0.2 stop down to f/1.2 and then it can be discussed if it's worthwhile to care. -The "worst" cameras scale about 0.6 stops though, and then it's more -valuable to compensate. If you skip aperture scaling RawTherapee will clip the -files a little bit too early and you miss that last fraction of highlight -detail, but you get no processing problems. Setting unconservative scale -factors can on the other hand cause a too high whitelevel and break highlight -processing, so be careful. + The scale factor you provide here is applied on the white level before black level subtraction (if any), i.e. directly on + the white level value you provide in the camconst.json file. Black level (if provided) is not scaled. Please report to + us if you come across a camera which scales black levels, then we can add that as an option. Usually the camera applies + an offset to shift back the black level to the standard level after scaling. -Scaling can vary sligthly depending on ISO (if white levels vary) so make -sure to provide conservative scalings so regardless of ISO you don't get a -too high white level. We recommend to keep a small margin here also -white levels, ie 0.5% lower or so. For example if base (not conservative!) -white level is 15750 and the scaled is 16221 we have a scaling factor of -16221/15750=1.0299 ie +2.9% we set the factor to 1.025 to keep a margin. -The abnormal cases are already covered by setting conservative per ISO White levels. + If RawTherapee doesn't find an entry for the aperture used in the image, it will pick the closest above, i.e. if the + apertures 1.0 and 2.0 is in the table and the image has aperture 1.2, it will pick scaling for 2.0, even if 1.0 is the + closer aperture. The reason for always checking the closest above is that we rather get a bit too low white level than + too high, as discussed before. -The scale factor you provide here is applied on the white level before black -level subtraction (if any), ie directly on the white level value you provide in -the camconst.json file. Black level (if provided) is not scaled. Please report -to us if you come across a camera which scales black levels, then we can add -that as an option. Usually the camera applies an offset to shift back the -black level to the standard level after scaling. + Some cameras have different white levels on different color channels. When this is the case the difference is often so + small so you can just provide a single value instead, i.e. a conservative value based on the lowest clipping. -If RawTherapee doesn't find an entry for the aperture used in the image, it -will pick the closest above. Ie if the apertures 1.0 and 2.0 is in the table -and the image has aperture 1.2, it will pick scaling for 2.0, even if 1.0 is -the closer aperture. The reason for always checking the closest above is that -we rather get a bit too low white level than too high, as discussed before. + What we know at the time of writing about different brands/models (not complete info): + - Canon CR2: typically same clipping per channel, but significant variations on ISO and aperture. Maxes out at 16383, + black level measured on masked black pixels, i.e. don't provide that. + - Nikon NEF: sometimes different clipping per color (most often negligible though). Will do aperture and ISO scaling, + but often to a lesser extent than Canon files, i.e. not as much to gain. + - Sony ARW2: no scaling. Generally black level around 512, and white level 16350 and to be conservative say 16300. -Some cameras have different white levels on different color channels. When -this is the case the difference is often so small so you can just provide a -single value instead, ie a conservative value based on the lowest clipping. + Note that some raw formats may go through a certain amount of pre-processing based on meta data, such as curve and + levels adjustments and various calibrations. The Phase One IIQ is one example, and this means that if you look at the + data in a raw analyzer such as RawDigger it may perform a different type of preprocessing than RawTherapee's loader + does, and you may end up providing incompatible black/white levels. -What we know at the time of writing about different brands/models (not -complete info): + You can use RawTherapee for analysis too, it's safer as you are using it's own raw decoder but it's not as + user-friendly: enable verbose mode in options so you get output on the console. When you load a file you will see a + message of current black and white levels and if they came from dcraw or camconst.json. If you're adjusting an existing + camconst.json value you can just read what it is in the file and not need to enable verbose output. - - Canon CR2: typically same clipping per channel, but significant variations - on ISO and aperture. Maxes out at 16383, black level measured on masked - black pixels, ie don't provide that. - - Nikon NEF: sometimes different clipping per color (most often negligible - though). Will do aperture and ISO scaling, but often to a lesser extent - than Canon files, ie not as much to gain. - - Sony ARW2: no scaling. Generally black level around 512, and white level - 16350 and to be conservative say 16300. + Reset exposure sliders to neutral, and zoom in on a large clipped highlight. Move around the mouse pointer within, it + should show stable 100% on R G B. If so, the white level is not too high, it could however be too low. To test that, go + to the raw tab and adjust the "white point linear correction factor", reduce it until one of the channels is no longer + 100%, and then increase in steps of 0.01 until all are 100 again. Usually you play around in the range 0.90 to 0.99, i.e. + a very small adjustment. When you've found this factor you should apply it on the old white level to find a new larger + one. As RT's "white point linear correction factor" work after black level subtraction and camconst.json want values + without it we need to do some math: -Note that some raw formats may go through a certain amount of pre-processing -based on meta data, such as curve and levels adjustments and various -calibrations. The Phase One IIQ is one example, and this means that if you -look at the data in a raw analyzer such as RawDigger it may perform a -different type of preprocessing than RawTherapee's loader does, and you may -end up providing incompatible black/white levels. + BL = black level (typically something near 0, 256, 512, 1024 or 2048 find it in the verbose output or if available in + camconst.json) + F = white point linear correction factor you just found out (typically in the range 0.90 to 0.99 if you need to + increase white level, 1.01 to 1.10 if decrease) + oldWL = old white level, found in verbose output or in camconst.json if available. + newWL = BL + (oldWL - BL) / F -You can use RawTherapee for analysis too, it's safer as you are using it's -own raw decoder but it's not as user-friendly: enable verbose mode in options -so you get output on the console. When you load a file you will see a message -of current black and white levels and if they came from dcraw or camconst.json. -If you're adjusting an existing camconst.json value you can just read what it is in -the file and not need to enable verbose output. + Note that if black level is 0 which it is for many cameras, the formula simplifies to: new white level = oldWL / F. -Reset exposure sliders to neutral, and zoom in on a large clipped highlight. -Move around the mouse pointer within, it should show stable 100% on R G B. If -so, the white level is not too high, it could however be too low. To test that, -go to the raw tab and adjust the "whitepoint linear correction factor", reduce -it until one of the channels is no longer 100%, and then increase in steps of -0.01 until all are 100 again. Usually you play around in the range 0.90 to -0.99, ie a very small adjustment. When you've found this factor you should -apply it on the old white level to find a new larger one. As RT's "whitepoint -linear correction factor" work after blacklevel subtraction and camconst.json -want values without it we need to do some math: + Here's an example from a Canon 1000D: black level is 256, old white level is 3651, white point correction factor becomes + 0.90, then new white level is 256 + (3651 - 256) / 0.9 = 4028. -BL = black level (typically something near 0, 256, 512, 1024 or 2048 find it in the - verbose output or if available in camconst.json) -F = whitepoint linear correction factor you just found out (typically in the - range 0.90 to 0.99 if you need to increase white level, 1.01 to 1.10 if - decrease) -oldWL = old white level, found in verbose output or in camconst.json if - available. + If your camera have different black levels per channel use the one which yields the smallest white level (can be the + largest or smallest, test!). -new white level = BL + (oldWL - BL) / F + This new white level you then enter in your camconst.json file. The same procedure can be used if the white level is too + high, i.e. if you see pink highlights, then increase the correction factor above 1.0 until you just start seeing stable + 100% on all channels, you use the same formula to calculate the new smaller white level. -Note that if black level is 0 which it is for many cameras, the formula -simplifies to: new white level = oldWL / F. - -Here's an example from a Canon 1000D: black level is 256, old white level is -3651, whitepoint correction factor becomes 0.90, then new white level is -256 + (3651 - 256) / 0.9 = 4028. - -If your camera have different black levels per channel use the one which -yields the smallest white level (can be the largest or smallest, test!). - -This new white level you then enter in your camconst.json file. The same -procedure can be used if the white level is too high, ie if you see pink -highlights, then increase the correction factor above 1.0 until you just start -seeing stable 100% on all channels, you use the same formula to calculate the -new smaller white level. About black levels: ------------------- -Unlike for white levels it's much more common that black levels can be -derived from the format. Either it's simply 0 (typical for old Nikon cameras, -newer Nikons (year2013-14) have a BL at around 150 12-bit or 600/768 14-bit ), -or it can be derived from masked pixels (typical for Canon cameras) or otherwise -be extracted from some tag. -Some formats have built-in subtraction information and are pre-processed by DCRaw -to end up at a black level of zero(Phase One's IIQ). -For Panasonic raws beginning from Dcraw v9.21 Dcraw/RT reads base BL from exif data -(tags 0x001c BlackLevelRed, 0x001d BlackLevelGreen, 0x001e BlackLevelBlue)and we -define in "ranges": { "black": the needed offset of around 15. The (total) BL RT displays is base+offset -In all, you typically should not care about the black level in camconst.json, -any information that can be derived from the raw file itself should not be specified in camconst.json! -Sony's ARW2 is one of the few exceptions (with single black level around 512, or 800 for RX10/100 models), -but DCraw generally has good constants for these already. + Unlike for white levels it's much more common that black levels can be derived from the format. Either it's simply + 0 (typical for old Nikon cameras, newer Nikons (year 2013-14) have a BL at around 150 12-bit or 600/768 14-bit ), or it + can be derived from masked pixels (typical for Canon cameras) or otherwise be extracted from some tag. -Currently we have chosen not to provide any guide how to measure black levels -as we don't think it will be a common task (it's also more difficult to do -than measure white levels). If you experience a black level issue it's more -likely due to a format parsing bug which should be fixed in DCRaw and/or -RawTherapee's raw format parser. + Some formats have built-in subtraction information and are pre-processed by dcraw to end up at a black level of + zero (Phase One's IIQ). For Panasonic raws beginning from dcraw v9.21 dcraw/RT reads base BL from Exif data (tags 0x001c + BlackLevelRed, 0x001d BlackLevelGreen, 0x001e BlackLevelBlue) and we define in "ranges": { "black": the needed offset + of around 15. The (total) BL RT displays is base+offset In all, you typically should not care about the black + level in camconst.json, any information that can be derived from the raw file itself should not be specified in + camconst.json! Sony's ARW2 is one of the few exceptions (with single black level around 512, or 800 for + RX10/100 models), but dcraw generally has good constants for these already. -How does a black level issue look? If the image has a color cast and is -possibly duller than normal it's likely that black levels are off. The color -cast is typically stronger in darker colors but it can be hard to see, it's -more often experienced as a cast over the whole image. + Currently we have chosen not to provide any guide how to measure black levels as we don't think it will be a common task + (it's also more difficult to do than measure white levels). If you experience a black level issue it's more likely due + to a format parsing bug which should be fixed in dcraw and/or RawTherapee's raw format parser. + + How does a black level issue look? If the image has a color cast and is possibly duller than normal it's likely that + black levels are off. The color cast is typically stronger in darker colors but it can be hard to see, it's more often + experienced as a cast over the whole image. + + +Camera constants: +----------------- + + When adding camera constants please set a quality level so we know the status for future updates + + Quality A: complete information, no need to add more, to the best of our knowledge + Quality B: not complete, but very little to gain from adding more + Quality C: complementing with additional information would provide significant gain + Quality X: unknown, i.e. we know too little about the camera properties to know if we have enough info. */ + {"camera_constants": [ -/* - -When adding camera constants please set a quality level so we know the status for future updates - -Quality A: complete information, no need to add more, to the best of our knowledge -Quality B: not complete, but very little to gain from adding more -Quality C: complementing with additional information would provide significant gain -Quality X: unknown, ie we knowing to little about the camera properties to know if - we have enough info or not. - -*/ - - { // quality A + { // Quality A "make_model": "Canon EOS 5D Mark II", "dcraw_matrix": [ 4716,603,-830,-7798,15474,2480,-1496,1937,6651 ], "ranges": { // black levels are read from raw masked pixels - // white levels are same for all colors, but vary on ISO + // white levels are same for all colors, but vary on ISO "white": [ { "iso": 50, "levels": 15600 }, // typical: 15760 { "iso": 100, "levels": 15600 }, @@ -416,98 +333,99 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "iso": 12800, "levels": 16200 }, { "iso": 25600, "levels": 16200 } ], - "white_max": 16383, + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for and f/1.0 (had no lenses to test with), but the - typical 15700 white level maxes out at "white_max" for f/1.8 and below anyway. */ - { "aperture": 1.2, "scale_factor": 1.100 }, // guessed by relative 5DIII data - { "aperture": 1.4, "scale_factor": 1.077 }, - { "aperture": 1.6, "scale_factor": 1.054 }, - { "aperture": 1.8, "scale_factor": 1.039 }, - { "aperture": 2.0, "scale_factor": 1.031 }, - { "aperture": 2.2, "scale_factor": 1.021 }, - { "aperture": 2.5, "scale_factor": 1.016 }, - { "aperture": 2.8, "scale_factor": 1.010 }, - { "aperture": 3.2, "scale_factor": 1.004 }, - { "aperture": 3.5, "scale_factor": 1.003 } + // no scale factors known for and f/1.0 (had no lenses to test with), but the typical 15700 white level + // maxes out at "white_max" for f/1.8 and below anyway. + { "aperture": 1.2, "scale_factor": 1.100 }, // guessed by relative 5DIII data + { "aperture": 1.4, "scale_factor": 1.077 }, + { "aperture": 1.6, "scale_factor": 1.054 }, + { "aperture": 1.8, "scale_factor": 1.039 }, + { "aperture": 2.0, "scale_factor": 1.031 }, + { "aperture": 2.2, "scale_factor": 1.021 }, + { "aperture": 2.5, "scale_factor": 1.016 }, + { "aperture": 2.8, "scale_factor": 1.010 }, + { "aperture": 3.2, "scale_factor": 1.004 }, + { "aperture": 3.5, "scale_factor": 1.003 } ] } }, - { // quality C, INTERMEDIATE ISO SAMPLES MISSING + + { // Quality C, INTERMEDIATE ISO SAMPLES MISSING "make_model": "Canon EOS-1D X Mark II", "dcraw_matrix": [ 7596,-978,-967,-4808,12571,2503,-1398,2567,5752 ], - // "raw_crop": [ 192, 96, 8696, 5800 ], // Full sensor 5568x3708 top38, left72, official crop left84, top50, right5555, bottom3697, 5472X3648 - // "masked_areas": [ 50, 4, 3697, 68 ], // left out 4 first columns from calculations because possibly the BL is still imbalanced there - "ranges": { - // black levels are read from raw masked pixels - // white levels are same for all colors all ISOs, but safety margin vary on ISO - "white": [ + //"raw_crop": [ 192, 96, 8696, 5800 ], // Full sensor 5568x3708 top38, left72, official crop left84, top50, right5555, bottom3697, 5472X3648 + //"masked_areas": [ 50, 4, 3697, 68 ], // left out 4 first columns from calculations because possibly the BL is still imbalanced there + "ranges": { + // black levels are read from raw masked pixels + // white levels are same for all colors all ISOs, but safety margin vary on ISO + "white": [ { "iso": 50, "levels": 16350 }, // typical for all ISOs: 16383, stdev 2.25 { "iso": 100, "levels": 16350 }, // stdev 2.25 { "iso": [ 125, 160, 200, 250 ], "levels": 16340 }, // stdev 2.5 { "iso": [ 320, 400, 500 ], "levels": 16330 }, // stdev 2.95 - { "iso": [ 640, 800, 1000 ], "levels": 16320 },// stdev x, 4.0 , x - { "iso": [ 1250, 1600, 2000 ], "levels": 16300 },// stdev x, 6.0 , x + { "iso": [ 640, 800, 1000 ], "levels": 16320 }, // stdev x, 4.0 , x + { "iso": [ 1250, 1600, 2000 ], "levels": 16300 }, // stdev x, 6.0 , x { "iso": [ 2500, 3200, 4000 ], "levels": 16250 }, // STDEV x, 9.8 , x { "iso": [ 5000, 6400, 8000 ], "levels": 16150 }, // stdev x, 17, x - { "iso": [ 10000, 12800, 16000 ], "levels": 16100 },// stdev x, 34 , x - { "iso": [ 20000, 25600, 32000 ], "levels": 16000 },// stdev x, 68 , x - { "iso": [ 40000, 51200, 64000 ], "levels": 15700 },// stdev x, 125, x - { "iso": [ 80000, 102400 ], "levels": 15100 },// stdev x, 245 + { "iso": [ 10000, 12800, 16000 ], "levels": 16100 }, // stdev x, 34 , x + { "iso": [ 20000, 25600, 32000 ], "levels": 16000 }, // stdev x, 68 , x + { "iso": [ 40000, 51200, 64000 ], "levels": 15700 }, // stdev x, 125, x + { "iso": [ 80000, 102400 ], "levels": 15100 }, // stdev x, 245 { "iso": [ 204800 ], "levels": 14000 }, { "iso": [ 409600 ], "levels": 13000 } - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* no need for aperture scaling because typical WL is 16383 at all ISOs .. */ - { "aperture": 1.2, "scale_factor": 1.130 }, // guessed by relative 6D data - { "aperture": 1.4, "scale_factor": 1.090 }, - { "aperture": 1.6, "scale_factor": 1.060 }, - { "aperture": 1.8, "scale_factor": 1.040 }, - { "aperture": 2.0, "scale_factor": 1.030 }, - { "aperture": 2.2, "scale_factor": 1.020 }, - { "aperture": 2.5, "scale_factor": 1.015 }, - { "aperture": 2.8, "scale_factor": 1.010 }, - { "aperture": 3.2, "scale_factor": 1.005 }, - { "aperture": 3.5, "scale_factor": 1.003 } + // no need for aperture scaling because typical WL is 16383 at all ISOs + { "aperture": 1.2, "scale_factor": 1.130 }, // guessed by relative 6D data + { "aperture": 1.4, "scale_factor": 1.090 }, + { "aperture": 1.6, "scale_factor": 1.060 }, + { "aperture": 1.8, "scale_factor": 1.040 }, + { "aperture": 2.0, "scale_factor": 1.030 }, + { "aperture": 2.2, "scale_factor": 1.020 }, + { "aperture": 2.5, "scale_factor": 1.015 }, + { "aperture": 2.8, "scale_factor": 1.010 }, + { "aperture": 3.2, "scale_factor": 1.005 }, + { "aperture": 3.5, "scale_factor": 1.003 } ] } }, - { // quality A, + + { // Quality A "make_model": "Canon EOS 5D Mark III", "dcraw_matrix": [ 6722,-635,-963,-4287,12460,2028,-908,2162,5668 ], "ranges": { // black levels are read from raw masked pixels - // white levels are same for all colors, but vary on ISO + // white levels are same for all colors, but vary on ISO "white": [ { "iso": [ 50, 100, 125, 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400, 8000, 12800, 16000, 20000 ], "levels": 15180 }, // typical: 15282 { "iso": [ 160, 320, 640, 1250, 2500, 5000, 10000 ], "levels": 13200 }, // typical: 13306 { "iso": [ 25600, 32000, 40000, 51200, 102400 ], "levels": 16200 } ], - "white_max": 16383, + "white_max": 16383, "aperture_scaling": [ - { "aperture": 1.2, "scale_factor": 1.130 }, - { "aperture": 1.4, "scale_factor": 1.090 }, - { "aperture": 1.6, "scale_factor": 1.065 }, - { "aperture": 1.8, "scale_factor": 1.040 }, - { "aperture": 2.0, "scale_factor": 1.025 }, - { "aperture": 2.2, "scale_factor": 1.020 }, - { "aperture": 2.5, "scale_factor": 1.015 }, - { "aperture": 2.8, "scale_factor": 1.010 }, - { "aperture": 3.2, "scale_factor": 1.005 }, - { "aperture": 3.5, "scale_factor": 1.002 } - ] - } + { "aperture": 1.2, "scale_factor": 1.130 }, + { "aperture": 1.4, "scale_factor": 1.090 }, + { "aperture": 1.6, "scale_factor": 1.065 }, + { "aperture": 1.8, "scale_factor": 1.040 }, + { "aperture": 2.0, "scale_factor": 1.025 }, + { "aperture": 2.2, "scale_factor": 1.020 }, + { "aperture": 2.5, "scale_factor": 1.015 }, + { "aperture": 2.8, "scale_factor": 1.010 }, + { "aperture": 3.2, "scale_factor": 1.005 }, + { "aperture": 3.5, "scale_factor": 1.002 } + ] + } }, - { // Quality B, some intermediate ISO samples missing, LENR samples missing - // so White Levels not properly indicated, some aperture scaling missing + { // Quality B, some intermediate ISO samples missing, LENR samples missing so White Levels not properly indicated, some aperture scaling missing "make_model": "Canon EOS 5D Mark IV", "dcraw_matrix": [ 6446,-366,-864,-4436,12204,2513,-952,2496,6348 ], // DNG_V9.7 D65 "raw_crop": [ 136, 42, 6740, 4500 ], // full size 6880x4544, official crop 148,54,6867,4533 "masked_areas": [ 54, 4, 4534, 132 ], "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125, 200, 250 ], "levels": 16100 }, // nominal 16383, LENR? { "iso": [ 160 ], "levels": 13000 }, // nominal f8-13105 { "iso": [ 320, 640, 1250, 2500 ], "levels": 13300 }, // G1,G2 F4.0-13422-F2.8-13562-13616 @@ -515,57 +433,56 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "iso": [ 400, 500, 800, 1000, 1600, 2000, 3200, 4000 ], "levels": 16100 }, // nominal 16383, { "iso": [ 6400, 8000, 12800, 16000, 25600, 32000 ], "levels": 16000 }, // R,G1,G2 16383, LENR? { "iso": [ 40000, 51200, 102400 ], "levels": 15800 } // 16383, LENR? - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: need for more data to properly fill all scale factors */ - { "aperture": 1.4, "scale_factor": 1.130 }, // - { "aperture": 1.6, "scale_factor": 1.100 }, // - { "aperture": 1.8, "scale_factor": 1.070 }, // - { "aperture": 2.0, "scale_factor": 1.050 }, // 14171/13422=1.055 - { "aperture": 2.2, "scale_factor": 1.035 }, // 13954/13422=1.039 - { "aperture": 2.5, "scale_factor": 1.025 }, // 11400/11000=1.028 - { "aperture": 2.8, "scale_factor": 1.015 }, // 13562/13422 - 13731,13688,13562 - { "aperture": 3.2, "scale_factor": 1.010 }, // - { "aperture": 3.5, "scale_factor": 1.005 } // 13508/13422 - ] - } + /* need more data to properly fill all scale factors */ + { "aperture": 1.4, "scale_factor": 1.160 }, // guessed + { "aperture": 1.6, "scale_factor": 1.120 }, // guessed + { "aperture": 1.8, "scale_factor": 1.080 }, // guessed + { "aperture": 2.0, "scale_factor": 1.050 }, // 14171/13422=1.055 + { "aperture": 2.2, "scale_factor": 1.035 }, // 13954/13422=1.039 + { "aperture": 2.5, "scale_factor": 1.025 }, // 11400/11000=1.028 + { "aperture": 2.8, "scale_factor": 1.015 }, // 13562/13422 - 13731,13688,13562 + { "aperture": 3.2, "scale_factor": 1.010 }, // + { "aperture": 3.5, "scale_factor": 1.005 } // 13508/13422 + ] + } }, { // Quality C, intermediate ISO samples missing but safely guessed, aperture scaling measures missing "make_model": [ "Canon EOS 5DS R", "Canon EOS 5DS" ], - // "dcraw_matrix": [ 6848,-1661,-221,-3904,10931,3434,-470,1251,6039 ], // DNG_V9.0 A + //"dcraw_matrix": [ 6848,-1661,-221,-3904,10931,3434,-470,1251,6039 ], // DNG_V9.0 A "dcraw_matrix": [ 6250,-711,-808,-5153,12794,2636,-1249,2198,5610 ], // DNG_V9.0 D65 "raw_crop": [ 192, 96, 8696, 5800 ], // 800, 300, 7500, 4700 - 160,64,8730x5800 - sensor 8896x5920 top64, left160, official crop left196, top100, right 8883, bottom 5891, 8688X5792 "masked_areas": [ 100, 40, 5892, 158 ], // left out 40 first columns from calculations because possibly the BL is still imbalanced there "ranges": { - "white": [ - { "iso": [ 50, 100 ], "levels": 14650 }, // typical 14733 - { "iso": [ 160, 320, 640, 1250, 2500, 5000 ], "levels": 15280 }, // typical 15383 - { "iso": [ 125, 200, 250, 400, 500, 800, 1000, 1600, 2000 ], "levels": 15280 }, // typical R15330-GB15383 - { "iso": [ 3200, 4000, 6400, 8000, 10000, 12800, 16000, 20000, 25600 ], "levels": 15100 } // clippings at R 15200-15300, G1,G2,B 15360-15390 - ], - "white_max": 16383, + "white": [ + { "iso": [ 50, 100 ], "levels": 14650 }, // typical 14733 + { "iso": [ 160, 320, 640, 1250, 2500, 5000 ], "levels": 15280 }, // typical 15383 + { "iso": [ 125, 200, 250, 400, 500, 800, 1000, 1600, 2000 ], "levels": 15280 }, // typical R15330-GB15383 + { "iso": [ 3200, 4000, 6400, 8000, 10000, 12800, 16000, 20000, 25600 ], "levels": 15100 } // clippings at R 15200-15300, G1,G2,B 15360-15390 + ], + "white_max": 16383, "aperture_scaling": [ - /* note: */ - { "aperture": 1.4, "scale_factor": 1.150 }, // 37/32 6-0-6-0-7-0-6-0-7-0 - { "aperture": 1.6, "scale_factor": 1.070 }, // guessed - { "aperture": 1.8, "scale_factor": 1.040 }, // 15501/14733=1.0521, 15352/14733=1.042 16030/15390 - { "aperture": 2.0, "scale_factor": 1.025 }, // 15129/14733=1.0268 - 15800/15383=1.027 - { "aperture": 2.2, "scale_factor": 1.013 }, // 15591/15383, 14931/14733 - { "aperture": 2.5, "scale_factor": 1.008 }, // 14857/14733guessed - { "aperture": 2.8, "scale_factor": 1.003 }, // 14783/14733 15435/15383 - { "aperture": 3.2, "scale_factor": 1.001 }, // 15409/15383 - { "aperture": 3.5, "scale_factor": 1.000 } // 14733/14733 - ] - } + { "aperture": 1.4, "scale_factor": 1.150 }, // 37/32 6-0-6-0-7-0-6-0-7-0 + { "aperture": 1.6, "scale_factor": 1.070 }, // guessed + { "aperture": 1.8, "scale_factor": 1.040 }, // 15501/14733=1.0521, 15352/14733=1.042 16030/15390 + { "aperture": 2.0, "scale_factor": 1.025 }, // 15129/14733=1.0268 - 15800/15383=1.027 + { "aperture": 2.2, "scale_factor": 1.013 }, // 15591/15383, 14931/14733 + { "aperture": 2.5, "scale_factor": 1.008 }, // 14857/14733guessed + { "aperture": 2.8, "scale_factor": 1.003 }, // 14783/14733 15435/15383 + { "aperture": 3.2, "scale_factor": 1.001 }, // 15409/15383 + { "aperture": 3.5, "scale_factor": 1.000 } // 14733/14733 + ] + } }, { // Quality A, some missing scaling factors are safely guessed - samples by sfink16 & RawConvert at RT forums "make_model": "Canon EOS 6D", "dcraw_matrix": [ 7034,-804,-1014,-4420,12564,2058,-851,1994,5758 ], "ranges": { - "white": [ + "white": [ { "iso": [ 50, 100, 125, 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200 ], "levels": 15180 }, // typical 15283 { "iso": [ 4000, 6400, 8000, 12800 ], "levels": 15100 }, // typical 15283 { "iso": [ 16000, 25600 ], "levels": 14900 }, // typical 15283 @@ -573,77 +490,78 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "iso": [ 5000, 10000 ], "levels": 13000 }, // typical 13225 { "iso": [ 20000 ], "levels": 12800 }, // typical 13225 { "iso": [ 51200, 102400 ], "levels": 15900 } // typical 16383 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.0 (had no lenses to test with), but the - ISO 160-320... 12650 white levels maxes out at "white_max" for f/1.2 and below anyway. */ - { "aperture": 1.2, "scale_factor": 1.130 }, // from histogramm 1 gap in every 7 levels - { "aperture": 1.4, "scale_factor": 1.090 }, // histogram 3 gaps in every 32 levels - { "aperture": 1.6, "scale_factor": 1.060 }, // 16213/15283 - { "aperture": 1.8, "scale_factor": 1.040 }, // 16004/15283 - { "aperture": 2.0, "scale_factor": 1.030 }, // 15800/15283 - { "aperture": 2.2, "scale_factor": 1.020 }, // guessed - { "aperture": 2.5, "scale_factor": 1.015 }, // 15541/15283 - { "aperture": 2.8, "scale_factor": 1.010 }, // 15437/15283 - { "aperture": 3.2, "scale_factor": 1.005 }, // 15361/15283 - { "aperture": 3.5, "scale_factor": 1.000 } // no sample + // no scale factors known for f/1.0 (had no lenses to test with), but the + // ISO 160-320... 12650 white levels maxes out at "white_max" for f/1.2 and below anyway. + { "aperture": 1.2, "scale_factor": 1.130 }, // from histogramm 1 gap in every 7 levels + { "aperture": 1.4, "scale_factor": 1.090 }, // histogram 3 gaps in every 32 levels + { "aperture": 1.6, "scale_factor": 1.060 }, // 16213/15283 + { "aperture": 1.8, "scale_factor": 1.040 }, // 16004/15283 + { "aperture": 2.0, "scale_factor": 1.030 }, // 15800/15283 + { "aperture": 2.2, "scale_factor": 1.020 }, // guessed + { "aperture": 2.5, "scale_factor": 1.015 }, // 15541/15283 + { "aperture": 2.8, "scale_factor": 1.010 }, // 15437/15283 + { "aperture": 3.2, "scale_factor": 1.005 }, // 15361/15283 + { "aperture": 3.5, "scale_factor": 1.000 } // no sample ] } }, + { // Quality A, ISO and aperture WL data by CharlyW at RawTherapee forums, missing samples safely guessed "make_model": "Canon EOS 7D", "dcraw_matrix": [ 5962,-171,-732,-4189,12307,2099,-911,1981,6304 ], // Colin Walker - // "dcraw_matrix": [ 6844,-996,-856,-3876,11761,2396,-593,1772,6198 ], // dcraw + //"dcraw_matrix": [ 6844,-996,-856,-3876,11761,2396,-593,1772,6198 ], // dcraw "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13584 { "iso": [ 160, 320, 640, 1250, 2500 ], "levels": 12550 }, // typical 12650 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 5000, 6400, 12800 ], "levels": 15200 } // typical 15304 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (no lenses to test with), but the - typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.250 }, // guessed - { "aperture": 1.6, "scale_factor": 1.150 }, // guessed - { "aperture": 1.8, "scale_factor": 1.110 }, // 15196/13584 - { "aperture": 2.0, "scale_factor": 1.080 }, // 14734/13584 - { "aperture": 2.2, "scale_factor": 1.050 }, // 14386/13584 - { "aperture": 2.5, "scale_factor": 1.040 }, // 14272/13584 - { "aperture": 2.8, "scale_factor": 1.030 }, // 14042/13584 - { "aperture": 3.2, "scale_factor": 1.015 }, // guessed - { "aperture": 3.5, "scale_factor": 1.000 } // guessed negligible - ] - } + // no scale factors known for f/1.2 and f/1.0 (no lenses to test with), but the + // typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.250 }, // guessed + { "aperture": 1.6, "scale_factor": 1.150 }, // guessed + { "aperture": 1.8, "scale_factor": 1.110 }, // 15196/13584 + { "aperture": 2.0, "scale_factor": 1.080 }, // 14734/13584 + { "aperture": 2.2, "scale_factor": 1.050 }, // 14386/13584 + { "aperture": 2.5, "scale_factor": 1.040 }, // 14272/13584 + { "aperture": 2.8, "scale_factor": 1.030 }, // 14042/13584 + { "aperture": 3.2, "scale_factor": 1.015 }, // guessed + { "aperture": 3.5, "scale_factor": 1.000 } // guessed negligible + ] + } }, { // Quality A, f/1.6 aperture scale factor missing but safely guessed, ISO and aperture data by charlyw at RT forums "make_model": "Canon EOS 7D Mark II", "dcraw_matrix": [ 7268,-1082,-969,-4186,11839,2663,-825,2029,5839 ], // dng_v8.7 d65 - // "dcraw_matrix": [ 6285,-147,-821,-4080,11695,2714,-1045,2459,5497 ], // DXO D50 + //"dcraw_matrix": [ 6285,-147,-821,-4080,11695,2714,-1045,2459,5497 ], // DXO D50 "ranges": { - "white": [ - { "iso": [ 100, 125 ], "levels": 13500 }, // typical 13583 - LENR 13550 - { "iso": [ 160, 320, 640, 1250, 2500, 5000 ], "levels": 12500 }, // typical 12559 - { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000 ], "levels": 15200 }, // typical 15303 - LENR 15270,15260,15240,15220, - { "iso": [ 6400, 8000, 10000, 12800, 16000, 20000, 25600 ], "levels": 15100 }, // typical G1,G2 15303, R,B = 15430 LENR 15200 .. 15100 - { "iso": 51200, "levels": 16300 } // typical 16383 red 16371 - ], - "white_max": 16383, + "white": [ + { "iso": [ 100, 125 ], "levels": 13500 }, // typical 13583 - LENR 13550 + { "iso": [ 160, 320, 640, 1250, 2500, 5000 ], "levels": 12500 }, // typical 12559 + { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000 ], "levels": 15200 }, // typical 15303 - LENR 15270,15260,15240,15220, + { "iso": [ 6400, 8000, 10000, 12800, 16000, 20000, 25600 ], "levels": 15100 }, // typical G1,G2 15303, R,B = 15430 LENR 15200 .. 15100 + { "iso": 51200, "levels": 16300 } // typical 16383 red 16371 + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.6, f/1.0 (had no lenses to test with) */ - { "aperture": 1.4, "scale_factor": 1.200 }, // 15100/12277 exif - { "aperture": 1.6, "scale_factor": 1.100 }, // guessed - { "aperture": 1.8, "scale_factor": 1.050 }, // 14372/13583 - 13283 - { "aperture": 2.0, "scale_factor": 1.030 }, // 14034/13583 - 12973 - { "aperture": 2.2, "scale_factor": 1.015 }, // 13808/13583 - 12766 - { "aperture": 2.5, "scale_factor": 1.007 }, // 13696/13583 - 12662 - { "aperture": 2.8, "scale_factor": 1.007 }, // 13696/13583 - 12663 - { "aperture": 3.2, "scale_factor": 1.000 }, // 13583/13583 - 12559 - { "aperture": 3.5, "scale_factor": 1.000 } - ] - } + /* no scale factors known for f/1.6, f/1.0 (had no lenses to test with) */ + { "aperture": 1.4, "scale_factor": 1.200 }, // 15100/12277 Exif + { "aperture": 1.6, "scale_factor": 1.100 }, // guessed + { "aperture": 1.8, "scale_factor": 1.050 }, // 14372/13583 - 13283 + { "aperture": 2.0, "scale_factor": 1.030 }, // 14034/13583 - 12973 + { "aperture": 2.2, "scale_factor": 1.015 }, // 13808/13583 - 12766 + { "aperture": 2.5, "scale_factor": 1.007 }, // 13696/13583 - 12662 + { "aperture": 2.8, "scale_factor": 1.007 }, // 13696/13583 - 12663 + { "aperture": 3.2, "scale_factor": 1.000 }, // 13583/13583 - 12559 + { "aperture": 3.5, "scale_factor": 1.000 } + ] + } }, { // Quality A - ISO and aperture WL data by Ilias at Avclub gr forums @@ -652,7 +570,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "raw_crop": [ 30, 18, 3908, 2602 ], "masked_areas": [ 20, 2, 2616, 20 ], "ranges": { - "white": [ + "white": [ { "iso": 100, "levels": 13700 }, // typical 13825 { "iso": [ 125, 250, 500, 1000, 3200 ], "levels": 16280 }, // typical 16383 { "iso": [ 160, 320, 640 ], "levels": 12600 }, // typical 12744 @@ -660,118 +578,122 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "iso": 800, "levels": 15900 }, // gaussian histogram 15900-16224 { "iso": 1600, "levels": 14900 }, // gaussian histogram 14900-15750 { "iso": 1250, "levels": 11900 } // gaussian histogram 11900-12500 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the - typical 12700 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.265 }, // 16142/12744 - { "aperture": 1.6, "scale_factor": 1.145 }, // 15872/13825 - { "aperture": 1.8, "scale_factor": 1.090 }, // 15103/13825 - { "aperture": 2.0, "scale_factor": 1.035 }, // 14334/13825 - { "aperture": 2.2, "scale_factor": 1.005 }, // 13950/13825 - { "aperture": 2.5, "scale_factor": 1.000 } // 13825/13825 + // no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the + // typical 12700 white levels maxes out at "white_max" for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.265 }, // 16142/12744 + { "aperture": 1.6, "scale_factor": 1.145 }, // 15872/13825 + { "aperture": 1.8, "scale_factor": 1.090 }, // 15103/13825 + { "aperture": 2.0, "scale_factor": 1.035 }, // 14334/13825 + { "aperture": 2.2, "scale_factor": 1.005 }, // 13950/13825 + { "aperture": 2.5, "scale_factor": 1.000 } // 13825/13825 ] - } + } }, + { // Quality A, ISO and aperture WL data by Ayshih at Magic Lantern forums "make_model": "Canon EOS 50D", "dcraw_matrix": [ 4920,616,-593,-6493,13964,2784,-1774,3178,7005 ], "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13300 }, // typical 13432 { "iso": [ 160, 320, 640, 1250 ], "levels": 12700 }, // typical 12790-12810 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 2500, 3200 ], "levels": 15630 }, // typical 15763-15733 { "iso": [ 6400, 12800 ], "levels": 16200 } // typical 16383 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - { "aperture": 1.4, "scale_factor": 1.270 }, - { "aperture": 1.6, "scale_factor": 1.150 }, - { "aperture": 1.8, "scale_factor": 1.090 }, - { "aperture": 2.0, "scale_factor": 1.040 }, - { "aperture": 2.2, "scale_factor": 1.020 }, - { "aperture": 2.5, "scale_factor": 1.010 }, - { "aperture": 2.8, "scale_factor": 1.000 }, - { "aperture": 3.2, "scale_factor": 1.000 } + { "aperture": 1.4, "scale_factor": 1.270 }, + { "aperture": 1.6, "scale_factor": 1.150 }, + { "aperture": 1.8, "scale_factor": 1.090 }, + { "aperture": 2.0, "scale_factor": 1.040 }, + { "aperture": 2.2, "scale_factor": 1.020 }, + { "aperture": 2.5, "scale_factor": 1.010 }, + { "aperture": 2.8, "scale_factor": 1.000 }, + { "aperture": 3.2, "scale_factor": 1.000 } ] - } + } }, + { // Quality A, ISO and aperture WL data copyed from Shalrath's 60D data at RawTherapee forums "make_model": "Canon EOS 60Da", "dcraw_matrix": [ 17492,-7240,-2023,-1791,10323,1701,-186,1329,5406 ], // 60Da dng d65 "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13583 { "iso": [ 160, 320, 640, 1250, 2500 ], "levels": 12550 }, // typical 12650 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 5000, 6400, 12800 ], "levels": 15200 } // typical 15304 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the - typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.300 }, // gaps 81of301 - { "aperture": 1.6, "scale_factor": 1.200 }, - { "aperture": 1.8, "scale_factor": 1.140 }, - { "aperture": 2.0, "scale_factor": 1.080 }, // gaps 1of11 - { "aperture": 2.2, "scale_factor": 1.060 }, - { "aperture": 2.5, "scale_factor": 1.050 }, - { "aperture": 2.8, "scale_factor": 1.030 }, - { "aperture": 3.2, "scale_factor": 1.015 }, - { "aperture": 3.5, "scale_factor": 1.000 } // no sample but it would be negligible + // no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the + // typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.300 }, // gaps 81of301 + { "aperture": 1.6, "scale_factor": 1.200 }, + { "aperture": 1.8, "scale_factor": 1.140 }, + { "aperture": 2.0, "scale_factor": 1.080 }, // gaps 1of11 + { "aperture": 2.2, "scale_factor": 1.060 }, + { "aperture": 2.5, "scale_factor": 1.050 }, + { "aperture": 2.8, "scale_factor": 1.030 }, + { "aperture": 3.2, "scale_factor": 1.015 }, + { "aperture": 3.5, "scale_factor": 1.000 } // no sample but it would be negligible ] - } + } }, + { // Quality A, ISO and aperture WL data by Shalrath at RawTherapee forums "make_model": "Canon EOS 60D", "dcraw_matrix": [ 6719,-994,-925,-4408,12426,2211,-887,2129,6051 ], "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13583 { "iso": [ 160, 320, 640, 1250, 2500 ], "levels": 12550 }, // typical 12650 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 5000, 6400, 12800 ], "levels": 15200 } // typical 15304 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the - typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.300 }, // gaps 81of301 - { "aperture": 1.6, "scale_factor": 1.200 }, - { "aperture": 1.8, "scale_factor": 1.140 }, - { "aperture": 2.0, "scale_factor": 1.080 }, // gaps 1of11 - { "aperture": 2.2, "scale_factor": 1.060 }, - { "aperture": 2.5, "scale_factor": 1.050 }, - { "aperture": 2.8, "scale_factor": 1.030 }, - { "aperture": 3.2, "scale_factor": 1.015 }, - { "aperture": 3.5, "scale_factor": 1.000 } // no sample but it would be negligible + // no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the + // typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.300 }, // gaps 81of301 + { "aperture": 1.6, "scale_factor": 1.200 }, + { "aperture": 1.8, "scale_factor": 1.140 }, + { "aperture": 2.0, "scale_factor": 1.080 }, // gaps 1of11 + { "aperture": 2.2, "scale_factor": 1.060 }, + { "aperture": 2.5, "scale_factor": 1.050 }, + { "aperture": 2.8, "scale_factor": 1.030 }, + { "aperture": 3.2, "scale_factor": 1.015 }, + { "aperture": 3.5, "scale_factor": 1.000 } // no sample but it would be negligible ] - } + } }, + { // Quality B, more aperture scale factors needed "make_model": "Canon EOS 70D", "dcraw_matrix": [ 7034,-804,-1014,-4420,12564,2058,-851,1994,5758 ], // DNG D65 "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13583 { "iso": [ 160, 320, 640, 1250, 2500, 5000 ], "levels": 12450 }, // typical 12559 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400, 8000, 10000 ], "levels": 15200 }, // typical 15303 - ISO 8000-10000 guessed { "iso": [ 12800, 25600 ], "levels": 16200 } // typical 16383 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but even with the - 12500 white levels nearly maxes out for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.240 }, // guessed - { "aperture": 1.6, "scale_factor": 1.160 }, // guessed - { "aperture": 1.8, "scale_factor": 1.110 }, // 31of35 - { "aperture": 2.0, "scale_factor": 1.060 }, // guessed - { "aperture": 2.2, "scale_factor": 1.030 }, // guessed - { "aperture": 2.5, "scale_factor": 1.015 }, // guessed - { "aperture": 2.8, "scale_factor": 1.008 }, // 15432/15303 - { "aperture": 3.2, "scale_factor": 1.000 }, - { "aperture": 3.5, "scale_factor": 1.000 } + // no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but even with the + // 12500 white levels nearly maxes out for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.240 }, // guessed + { "aperture": 1.6, "scale_factor": 1.160 }, // guessed + { "aperture": 1.8, "scale_factor": 1.110 }, // 31of35 + { "aperture": 2.0, "scale_factor": 1.060 }, // guessed + { "aperture": 2.2, "scale_factor": 1.030 }, // guessed + { "aperture": 2.5, "scale_factor": 1.015 }, // guessed + { "aperture": 2.8, "scale_factor": 1.008 }, // 15432/15303 + { "aperture": 3.2, "scale_factor": 1.000 }, + { "aperture": 3.5, "scale_factor": 1.000 } ] - } + } }, { // Quality C, White Levels not properly indicated, aperture scaling..missing scaling factors are guessed @@ -780,107 +702,110 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "raw_crop": [ 264, 34, 6024, 4022 ], // full size 6288x4056, official crop 276,46,6275,4045 "masked_areas": [ 40, 96, 4000, 260 ], "ranges": { - "white": [ - { "iso": [ 100, 125, 200, 250 ], "levels": 16200 }, // nominal 16383, LENR blue 16243 + "white": [ + { "iso": [ 100 ], "levels": 16100 }, // nominal 16383, LENR blue 16243 + { "iso": [ 125, 200, 250, 400 ], "levels": 16200 }, // nominal 16383, LENR blue 16243 { "iso": [ 160 ], "levels": 13000 }, // nominal 13097, - { "iso": [ 320, 640, 1250, 2500, 5000, 10000 ], "levels": 13200 }, // G1,G2 13415 - { "iso": [ 400, 500, 800, 1000, 1600, 2000, 3200, 4000 ], "levels": 16150 }, // nominal 16383, LENR ISO3200 16150 - { "iso": [ 6400, 8000, 12800, 16000, 25600 ], "levels": 16000 } // R,G1,G2 16383, B 16243, LENR B 16000 - ], - "white_max": 16383, + { "iso": [ 320, 640, 1250 ], "levels": 13250 }, // G1,G2 13415 + { "iso": [ 500, 800, 1000 ], "levels": 16150 }, // nominal 16383, LENR ISO3200 16150 + { "iso": [ 1600, 2000, 3200 ], "levels": 16100 }, // nominal 16383, LENR ISO3200 16150 + { "iso": [ 2500, 5000 ], "levels": 13150 }, // G1,G2 13415 + { "iso": [ 4000, 6400 ], "levels": 16050 }, // nominal 16383, LENR ISO6400 16050 + { "iso": [ 8000, 10000 ], "levels": 16000 }, // R,G1,G2 16383, B 16243, LENR B 16000 + { "iso": [ 12800, 16000, 25600 ], "levels": 15900 } // R,G1,G2 16383, B 16243, LENR BLUE 15750 + ], + "white_max": 16383, "aperture_scaling": [ - /* note: need for more data to properly fill all scale factors */ - { "aperture": 1.4, "scale_factor": 1.200 }, // guessed - { "aperture": 1.6, "scale_factor": 1.080 }, // guessed - { "aperture": 1.8, "scale_factor": 1.055 }, // guessed - { "aperture": 2.0, "scale_factor": 1.030 }, // guessed - { "aperture": 2.2, "scale_factor": 1.025 }, // guessed - { "aperture": 2.5, "scale_factor": 1.020 }, // guessed - { "aperture": 2.8, "scale_factor": 1.000 }, // - { "aperture": 3.2, "scale_factor": 1.000 }, // - { "aperture": 3.5, "scale_factor": 1.000 } // - ] - } + // need for more data to properly fill all scale factors + { "aperture": 1.4, "scale_factor": 1.200 }, // guessed + { "aperture": 1.6, "scale_factor": 1.130 }, // guessed + { "aperture": 1.8, "scale_factor": 1.090 }, // 14338/13097 = 1.094 + { "aperture": 2.0, "scale_factor": 1.060 }, // 13934/13097 = 1.063 + { "aperture": 2.2, "scale_factor": 1.025 }, // 13438/13097 = 1.026 + { "aperture": 2.5, "scale_factor": 1.005 }, // 13190/13097 = 1.007 + { "aperture": 2.8, "scale_factor": 1.000 } // 13097/13097 + ] + } }, -// Canon Mid category DSLRs (Rebels) +// Canon mid-range DSLRs (Rebels) - { // Quality b, ISO and aperture WL data by ..... at RawTherapee forums, missing samples safely guessed + { // Quality B, ISO and aperture WL data by ..... at RawTherapee forums, missing samples safely guessed "make_model": [ "Canon EOS 550D", "Canon EOS Rebel T2i", "Canon EOS Kiss X4" ], "dcraw_matrix": [ 6941,-1164,-857,-3825,11597,2534,-416,1540,6039 ], // dcraw 550d "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13584 { "iso": [ 160, 320, 640, 1250, 2500 ], "levels": 12550 }, // typical 12650 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 5000, 6400, 12800 ], "levels": 15200 } // typical 15304 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (no lenses to test with), but the - typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.250 }, // guessed - { "aperture": 1.6, "scale_factor": 1.150 }, // guessed - { "aperture": 1.8, "scale_factor": 1.110 }, // 15196/13584 - { "aperture": 2.0, "scale_factor": 1.080 }, // 14734/13584 - { "aperture": 2.2, "scale_factor": 1.050 }, // 14386/13584 - { "aperture": 2.5, "scale_factor": 1.040 }, // 14272/13584 - { "aperture": 2.8, "scale_factor": 1.030 }, // 14042/13584 - { "aperture": 3.2, "scale_factor": 1.015 }, // guessed - { "aperture": 3.5, "scale_factor": 1.000 } // guessed negligible - ] - } + // no scale factors known for f/1.2 and f/1.0 (no lenses to test with), but the + // typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.250 }, // guessed + { "aperture": 1.6, "scale_factor": 1.150 }, // guessed + { "aperture": 1.8, "scale_factor": 1.110 }, // 15196/13584 + { "aperture": 2.0, "scale_factor": 1.080 }, // 14734/13584 + { "aperture": 2.2, "scale_factor": 1.050 }, // 14386/13584 + { "aperture": 2.5, "scale_factor": 1.040 }, // 14272/13584 + { "aperture": 2.8, "scale_factor": 1.030 }, // 14042/13584 + { "aperture": 3.2, "scale_factor": 1.015 }, // guessed + { "aperture": 3.5, "scale_factor": 1.000 } // guessed negligible + ] + } }, - { // Quality b, scaling factors missing but guessed safely + { // Quality B, scaling factors missing but guessed safely "make_model": [ "Canon EOS 600D", "Canon EOS Rebel T3i", "Canon EOS Kiss X5", "Canon EOS 1200D", "Canon EOS Rebel T5", "Canon EOS Kiss X70" ], - // "dcraw_matrix": [ 13254,-6296,-1798,184,2753,90,1438,-566,1129 ], // Infrared guessed + //"dcraw_matrix": [ 13254,-6296,-1798,184,2753,90,1438,-566,1129 ], // Infrared guessed "dcraw_matrix": [ 6461,-907,-882,-4300,12184,2378,-819,1944,5931 ], // dcp D65 colormatrix2 "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13583 { "iso": [ 160, 320, 640, 1250, 2500, 5000, 10000 ], "levels": 12550 }, // typical 12650 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400, 8000, 12800 ], "levels": 15200 } // typical 15303 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the - typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.290 }, // guessed from 60D data - { "aperture": 1.6, "scale_factor": 1.190 }, // guessed - { "aperture": 1.8, "scale_factor": 1.140 }, // guessed - { "aperture": 2.0, "scale_factor": 1.090 }, // 12293/11222 = 1.095 - { "aperture": 2.2, "scale_factor": 1.060 }, // 11971/11222 = 1.066 - { "aperture": 2.5, "scale_factor": 1.050 }, // guessed - { "aperture": 2.8, "scale_factor": 1.030 }, // iso100: 14042/13584=1.0336 - iso200 15820/15303 = 1.0348 - { "aperture": 3.2, "scale_factor": 1.000 } // + // no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the + // typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.290 }, // guessed from 60D data + { "aperture": 1.6, "scale_factor": 1.190 }, // guessed + { "aperture": 1.8, "scale_factor": 1.140 }, // guessed + { "aperture": 2.0, "scale_factor": 1.090 }, // 12293/11222 = 1.095 + { "aperture": 2.2, "scale_factor": 1.060 }, // 11971/11222 = 1.066 + { "aperture": 2.5, "scale_factor": 1.050 }, // guessed + { "aperture": 2.8, "scale_factor": 1.030 }, // iso100: 14042/13584=1.0336 - iso200 15820/15303 = 1.0348 + { "aperture": 3.2, "scale_factor": 1.000 } // ] - } + } }, { // Quality A, only one scaling factor missing and guessed safely, EOS 700D not tested but available samples look same as 650D "make_model": [ "Canon EOS 650D", "Canon EOS Rebel T4i", "Canon EOS Kiss X6i", "Canon EOS 700D", "Canon EOS Rebel T5i", "Canon EOS Kiss X7i" ], "dcraw_matrix": [ 6602,-841,-939,-4472,12458,2247,-975,2039,6148 ], "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13583 { "iso": [ 160, 320, 640, 1250, 2500, 5000, 10000 ], "levels": 12550 }, // typical 12650 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400, 8000 ], "levels": 15200 }, // typical 15303 { "iso": [ 12800, 25600 ], "levels": 16200 } // typical 16383 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the - typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.200 }, // 16332/13583 - { "aperture": 1.6, "scale_factor": 1.080 }, // guessed - { "aperture": 1.8, "scale_factor": 1.055 }, // 14372/13583 - { "aperture": 2.0, "scale_factor": 1.030 }, // 14034/13583 - { "aperture": 2.2, "scale_factor": 1.025 }, // 13921/13583 - { "aperture": 2.5, "scale_factor": 1.020 }, // - { "aperture": 2.8, "scale_factor": 1.000 }, // - { "aperture": 3.2, "scale_factor": 1.000 } // + // no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the + // typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.200 }, // 16332/13583 + { "aperture": 1.6, "scale_factor": 1.080 }, // guessed + { "aperture": 1.8, "scale_factor": 1.055 }, // 14372/13583 + { "aperture": 2.0, "scale_factor": 1.030 }, // 14034/13583 + { "aperture": 2.2, "scale_factor": 1.025 }, // 13921/13583 + { "aperture": 2.5, "scale_factor": 1.020 }, // + { "aperture": 2.8, "scale_factor": 1.000 }, // + { "aperture": 3.2, "scale_factor": 1.000 } // ] - } + } }, { // Quality C, aperture scale factors and intermediate ISOs missing but safely guessed @@ -889,93 +814,93 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "raw_crop": [ 72, 34, 6024, 4022 ], // full size 6096x4056, official crop 84,46,6083,4045 "masked_areas": [ 40, 16, 4000, 54 ], "ranges": { - "white": [ - { "iso": [ 100, 125 ], "levels": 13300 }, // typical 13583 - { "iso": [ 160, 320, 640, 1250, 2500, 5000 ], "levels": 12500 }, // typical 12600 - { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000 ], "levels": 15200 }, // typical 15303 - { "iso": [ 6400, 8000, 10000, 12800, 16000, 20000 ], "levels": 15100 }, // typical 15303 - { "iso": 25600, "levels": 16300 } // typical 16383 - ], - "white_max": 16383, + "white": [ + { "iso": [ 100, 125 ], "levels": 13300 }, // typical 13583 + { "iso": [ 160, 320, 640, 1250, 2500, 5000 ], "levels": 12500 }, // typical 12600 + { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000 ], "levels": 15200 }, // typical 15303 + { "iso": [ 6400, 8000, 10000, 12800, 16000, 20000 ], "levels": 15100 }, // typical 15303 + { "iso": 25600, "levels": 16300 } // typical 16383 + ], + "white_max": 16383, "aperture_scaling": [ - /* note: all scale factors are guessed to be same as 7DII */ - { "aperture": 1.4, "scale_factor": 1.200 }, // guessed - { "aperture": 1.6, "scale_factor": 1.100 }, // guessed - { "aperture": 1.8, "scale_factor": 1.050 }, // guessed - { "aperture": 2.0, "scale_factor": 1.030 }, // guessed - { "aperture": 2.2, "scale_factor": 1.015 }, // guessed - { "aperture": 2.5, "scale_factor": 1.007 }, // guessed - { "aperture": 2.8, "scale_factor": 1.007 }, // guessed - { "aperture": 3.2, "scale_factor": 1.000 }, // guessed - { "aperture": 3.5, "scale_factor": 1.000 } - ] - } + // all scale factors are guessed to be same as 7DII + { "aperture": 1.4, "scale_factor": 1.200 }, // guessed + { "aperture": 1.6, "scale_factor": 1.100 }, // guessed + { "aperture": 1.8, "scale_factor": 1.050 }, // guessed + { "aperture": 2.0, "scale_factor": 1.030 }, // guessed + { "aperture": 2.2, "scale_factor": 1.015 }, // guessed + { "aperture": 2.5, "scale_factor": 1.007 }, // guessed + { "aperture": 2.8, "scale_factor": 1.007 }, // guessed + { "aperture": 3.2, "scale_factor": 1.000 }, // guessed + { "aperture": 3.5, "scale_factor": 1.000 } + ] + } }, -// Canon Low End DSLRs +// Canon low-range DSLRs // Canon EOS 1200D/Rebel T5/Kiss X70" is upper at the same item as 600D/T3i/X5 { // Quality B, integer ISOs measured, intermediate ISO samples missing, - // scaling factors safely guessed to be same as 1200D .. + // scaling factors safely guessed to be same as 1200D "make_model": [ "Canon EOS 1300D", "Canon EOS Rebel T6", "Canon EOS Kiss X80" ], - "dcraw_matrix": [ 6939,-1016,-866,-4428,12473,2177,-1175,2178,6162 ], // Dcraw 9.27 + "dcraw_matrix": [ 6939,-1016,-866,-4428,12473,2177,-1175,2178,6162 ], // dcraw 9.27 "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13584 { "iso": [ 160, 320, 640, 1250, 2500, 5000, 10000 ], "levels": 12550 }, // typical 12650 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400, 8000, 12800 ], "levels": 15200 } // typical 15303 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the - typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.290 }, // guessed from 60D data - { "aperture": 1.6, "scale_factor": 1.190 }, // guessed - { "aperture": 1.8, "scale_factor": 1.140 }, // guessed - { "aperture": 2.0, "scale_factor": 1.090 }, // 12293/11222 = 1.095 - { "aperture": 2.2, "scale_factor": 1.060 }, // 11971/11222 = 1.066 - { "aperture": 2.5, "scale_factor": 1.050 }, // guessed - { "aperture": 2.8, "scale_factor": 1.030 }, // iso100: 14042/13584=1.0336 - iso200 15820/15303 = 1.0348 - { "aperture": 3.2, "scale_factor": 1.000 }, // - { "aperture": 3.5, "scale_factor": 1.000 } // + // no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the + // typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.290 }, // guessed from 60D data + { "aperture": 1.6, "scale_factor": 1.190 }, // guessed + { "aperture": 1.8, "scale_factor": 1.140 }, // guessed + { "aperture": 2.0, "scale_factor": 1.090 }, // 12293/11222 = 1.095 + { "aperture": 2.2, "scale_factor": 1.060 }, // 11971/11222 = 1.066 + { "aperture": 2.5, "scale_factor": 1.050 }, // guessed + { "aperture": 2.8, "scale_factor": 1.030 }, // iso100: 14042/13584=1.0336 - iso200 15820/15303 = 1.0348 + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // ] - } + } }, -// Canon Mirrorless with Interchangable Lens +// Canon MILC (mirrorless interchangeable-lens camera) { // Quality B, missing scaling factors are guessed safely from 650D relative data "make_model": "Canon EOS M", "dcraw_matrix": [ 6602,-841,-939,-4472,12458,2247,-975,2039,6148 ], "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125 ], "levels": 13480 }, // typical 13583 { "iso": [ 160, 320, 640, 1250, 2500, 5000, 10000 ], "levels": 12550 }, // typical 12650 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400, 8000 ], "levels": 15200 }, // typical 15303 { "iso": [ 12800, 25600 ], "levels": 16200 } // typical 16383 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the - typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. */ - { "aperture": 1.4, "scale_factor": 1.200 }, // guessed - { "aperture": 1.6, "scale_factor": 1.080 }, // guessed - { "aperture": 1.8, "scale_factor": 1.055 }, // guessed - { "aperture": 2.0, "scale_factor": 1.030 }, // 15821/15303 - { "aperture": 2.2, "scale_factor": 1.025 }, // 15691/15303 - { "aperture": 2.5, "scale_factor": 1.020 }, // 12947/12650 - { "aperture": 2.8, "scale_factor": 1.000 }, // - { "aperture": 3.2, "scale_factor": 1.000 }, // - { "aperture": 3.5, "scale_factor": 1.000 } // - ] - } + // no scale factors known for f/1.2 and f/1.0 (had no lenses to test with), but the + // typical 12650 white levels maxes out at "white_max" for f/1.4 and below anyway. + { "aperture": 1.4, "scale_factor": 1.200 }, // guessed + { "aperture": 1.6, "scale_factor": 1.080 }, // guessed + { "aperture": 1.8, "scale_factor": 1.055 }, // guessed + { "aperture": 2.0, "scale_factor": 1.030 }, // 15821/15303 + { "aperture": 2.2, "scale_factor": 1.025 }, // 15691/15303 + { "aperture": 2.5, "scale_factor": 1.020 }, // 12947/12650 + { "aperture": 2.8, "scale_factor": 1.000 }, // + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // + ] + } }, { // Quality C, inconsistent WL per ISO, missing scaling factors "make_model": "Canon EOS M10", "dcraw_matrix": [ 6400,-480,-888,-5294,13416,2047,-1296,2203,6137 ], // DNGv9.3 D65 "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125, 160, 320, 500, 2000, 4000, 6400 ], "levels": 16300 }, // typical 16383 { "iso": 200, "levels": 12900 }, // typical 12940-15570-15376 { "iso": 250, "levels": 14100 }, // typical 14200 @@ -987,93 +912,125 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "iso": 3200, "levels": 15000 }, // typical 15080-16383-16100-13660 { "iso": 5000, "levels": 12800 }, // typical 12840 { "iso": [ 12800, 25600 ], "levels": 16200 } // typical 16383 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: all scale factors are copied from EOS M3 */ - { "aperture": 1.4, "scale_factor": 1.200 }, // guessed - { "aperture": 1.6, "scale_factor": 1.080 }, // guessed - { "aperture": 1.8, "scale_factor": 1.055 }, // guessed - { "aperture": 2.0, "scale_factor": 1.030 }, // guessed - { "aperture": 2.2, "scale_factor": 1.025 }, // guessed - { "aperture": 2.5, "scale_factor": 1.020 }, // guessed - { "aperture": 2.8, "scale_factor": 1.000 }, // - { "aperture": 3.2, "scale_factor": 1.000 }, // - { "aperture": 3.5, "scale_factor": 1.000 } // - ] - } + // all scale factors are copied from EOS M3 */ + { "aperture": 1.4, "scale_factor": 1.200 }, // guessed + { "aperture": 1.6, "scale_factor": 1.080 }, // guessed + { "aperture": 1.8, "scale_factor": 1.055 }, // guessed + { "aperture": 2.0, "scale_factor": 1.030 }, // guessed + { "aperture": 2.2, "scale_factor": 1.025 }, // guessed + { "aperture": 2.5, "scale_factor": 1.020 }, // guessed + { "aperture": 2.8, "scale_factor": 1.000 }, // + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // + ] + } }, - { // Quality C, White Levels not properly indicated, aperture scaling..missing scaling factors are guessed + { // Quality C, white levels not properly indicated, aperture scaling..missing scaling factors are guessed "make_model": "Canon EOS M3", "dcraw_matrix": [ 6362,-823,-847,-4426,12109,2616,-743,1857,5635 ], // DNG_V8.8 D65 "raw_crop": [ 72, 34, 6024, 4022 ], // full size 6096x4056, official crop 84,46,6083,4045 "masked_areas": [ 40, 16, 4000, 54 ], "ranges": { - "white": [ + "white": [ { "iso": [ 100, 125, 160 ], "levels": 16300 }, // 16383 { "iso": [ 320, 640, 1250, 2500, 5000, 10000 ], "levels": 12600 }, // 12632..14500 { "iso": [ 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200, 4000 ], "levels": 15000 }, // 15095, 15488 { "iso": [ 6400, 8000, 12800, 25600 ], "levels": 16200 } // 16383 - ], - "white_max": 16383, + ], + "white_max": 16383, "aperture_scaling": [ - /* note: need for more data to properly fill all scale factors */ - { "aperture": 1.4, "scale_factor": 1.200 }, // guessed - { "aperture": 1.6, "scale_factor": 1.080 }, // guessed - { "aperture": 1.8, "scale_factor": 1.055 }, // guessed - { "aperture": 2.0, "scale_factor": 1.030 }, // guessed - { "aperture": 2.2, "scale_factor": 1.025 }, // guessed - { "aperture": 2.5, "scale_factor": 1.020 }, // guessed - { "aperture": 2.8, "scale_factor": 1.000 }, // - { "aperture": 3.2, "scale_factor": 1.000 }, // - { "aperture": 3.5, "scale_factor": 1.000 } // - ] - } + // need for more data to properly fill all scale factors + { "aperture": 1.4, "scale_factor": 1.200 }, // guessed + { "aperture": 1.6, "scale_factor": 1.080 }, // guessed + { "aperture": 1.8, "scale_factor": 1.055 }, // guessed + { "aperture": 2.0, "scale_factor": 1.030 }, // guessed + { "aperture": 2.2, "scale_factor": 1.025 }, // guessed + { "aperture": 2.5, "scale_factor": 1.020 }, // guessed + { "aperture": 2.8, "scale_factor": 1.000 }, // + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // + ] + } + }, + + { // Quality C, White Levels not properly indicated, aperture scaling..missing factors are guessed + "make_model": "Canon EOS M5", + "dcraw_matrix": [ 8532,-701,-1167,-4095,11879,2508,-797,2424,7010 ], // DNG_V9.8 D65 + "raw_crop": [ 264, 36, 6024, 4020 ], // full size 6288x4056, + //"raw_crop": [ 272, 44, 6008, 4008 ], // matched to official crop 276,48,6275,4047 - official jpeg 6000X4000 + "masked_areas": [ 40, 96, 4000, 260 ], + "ranges": { + "white": [ + { "iso": [ 100, 125, 200, 250 ], "levels": 15600 }, // nominal 15660-15800 + { "iso": [ 160 ], "levels": 13000 }, // guessed + { "iso": [ 320 ], "levels": 13200 }, // nominal green13528-14466-14380-14368 - blue13262-14186, + { "iso": [ 640, 1250 ], "levels": 13150 }, // iso 640 G1,G2 13260-13450 - blue13230-13430 -iso 1250 13430 + { "iso": [ 2500, 5000, 10000 ], "levels": 13100 }, // + { "iso": [ 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400 ], "levels": 16100 }, // 16383 + { "iso": [ 8000, 12800, 16000, 25600 ], "levels": 16000 } // R,G1,G2 16383, B 16243 + ], + "white_max": 16383, + "aperture_scaling": [ + // need for more data to properly fill all scale factors + { "aperture": 1.4, "scale_factor": 1.200 }, // 31/25 + { "aperture": 1.6, "scale_factor": 1.080 }, // guessed + { "aperture": 1.8, "scale_factor": 1.050 }, // guessed + { "aperture": 2.0, "scale_factor": 1.030 }, // 15292/ 14916/ 320-14466/ 320-13528/ + { "aperture": 2.2, "scale_factor": 1.020 }, // guessed + { "aperture": 2.5, "scale_factor": 1.010 }, // guessed + { "aperture": 2.8, "scale_factor": 1.000 }, // + { "aperture": 3.2, "scale_factor": 1.000 }, // + { "aperture": 3.5, "scale_factor": 1.000 } // + ] + } }, // Canon Powershot - { // Quality C, CHDK DNGs, raw frame corrections, experimental infrared support commented out + { // Quality C, CHDK DNGs, raw frame corrections, experimental infrared support commented out "make_model": "Canon PowerShot A480", "dcraw_matrix": [ 8275,-2905,-1261,-128,5305,505,52,482,2450 ], // DNG_CHDK_V1.3.0 Daylight - // "dcraw_matrix": [ 15906,-7425,-2014,-2010,5554,264,404,-265,2706 ], // Infrared guessed + //"dcraw_matrix": [ 15906,-7425,-2014,-2010,5554,264,404,-265,2706 ], // Infrared guessed "raw_crop": [ 6, 12, 3684, 2760 ], // full size 3720X2772, official Canon crop 3648x2736 "masked_areas": [ 12, 3694, 2760, 3716 ], // only left side optically black area is considered "ranges": { "white": 4080 } }, - { // Quality B, experimental infrared support commented out + { // Quality B, experimental infrared support commented out "make_model": "Canon PowerShot G9", "dcraw_matrix": [ 7368,-2141,-598,-5621,13254,2625,-1419,1696,5743 ], // DNG_V8.7 D65 - // "dcraw_matrix": [ 8796,-3770,311,-4148,11362,3197,-598,983,5880 ], // DNG_V8.7 A - // "dcraw_matrix": [ 15669,-8084,-2453,-2940,5756,101,126,-401,2463 ], // Infrared guessed 111 - // "dcraw_matrix": [ 13254,-6296,-1798,184,2753,90,1438,-566,1129 ], // Infrared guessed - "ranges": { "white": 4080 } + //"dcraw_matrix": [ 8796,-3770,311,-4148,11362,3197,-598,983,5880 ], // DNG_V8.7 A + //"dcraw_matrix": [ 15669,-8084,-2453,-2940,5756,101,126,-401,2463 ], // Infrared guessed 111 + //"dcraw_matrix": [ 13254,-6296,-1798,184,2753,90,1438,-566,1129 ], // Infrared guessed + "ranges": { "white": 4080 } }, - { // Quality A, changes for raw crop which is optimistic in Dcraw + { // Quality A, changes for raw crop which is optimistic in dcraw "make_model": "Canon PowerShot G12", "dcraw_matrix": [ 13244,-5501,-1248,-1508,9858,1935,-270,1083,4366 ], - // "raw_crop": [ 62, 18, 3666, 2748 ],// max usable - "raw_crop": [ 68, 20, 3656, 2744 ],// equal to official Canon frame, 72,24,3719,2759 = 3648x2736 - "masked_areas": [ 24, 40, 2770, 44 ],// as declared in maker data - "ranges": { "white": 4080 } // + //"raw_crop": [ 62, 18, 3666, 2748 ], // max usable + "raw_crop": [ 68, 20, 3656, 2744 ], // equal to official Canon frame, 72,24,3719,2759 = 3648x2736 + "masked_areas": [ 24, 40, 2770, 44 ], // as declared in maker data + "ranges": { "white": 4080 } }, - { /* Quality B, needs a way to auto apply 3/2 or 4/3 crops (read exif tags ..) to work better with auto distortion, - for the moment just comment-uncomment the desired raw crop */ + { // Quality B, needs a way to auto apply 3/2 or 4/3 crops (read Exif tags ..) to work better with auto distortion, + // for the moment just comment-uncomment the desired raw crop "make_model": "Canon PowerShot G1 X Mark II", "dcraw_matrix": [ 7378,-1255,-1043,-4088,12251,2048,-876,1946,5805 ], // D65 matrix from adobe dcp - // "raw_crop": [ 80, 50, 4400, 3316 ], // full frame 4480x3366 borders 80,50 - much shade in corners, no/wrong auto distortion - // "raw_crop": [ 104, 144, 4360, 3128 ], // Mixed best average frame, width is 4352 from 3/2, height 3120 from 4/3 - auto distortion does not work correctly - // "raw_crop": [ 200, 144, 4168, 3128 ], // Optional official 4/3 frame 4160x3120, 4pix borders, Left Border 204-4, Top Border 148-4 - "raw_crop": [ 104, 252, 4360, 2912 ], // Default official 3/2 frame 4352X2904, 4pix borders, Left Border 108-4, Top border 256-4 + //"raw_crop": [ 80, 50, 4400, 3316 ], // full frame 4480x3366 borders 80,50 - much shade in corners, no/wrong auto distortion + //"raw_crop": [ 104, 144, 4360, 3128 ], // Mixed best average frame, width is 4352 from 3/2, height 3120 from 4/3 - auto distortion does not work correctly + //"raw_crop": [ 200, 144, 4168, 3128 ], // Optional official 4/3 frame 4160x3120, 4pix borders, Left Border 204-4, Top Border 148-4 + "raw_crop": [ 104, 252, 4360, 2912 ], // Default official 3/2 frame 4352x2904, 4pix borders, Left Border 108-4, Top border 256-4 "masked_areas": [ 148, 2, 3340, 78 ], "ranges": { "white": 16300 } }, - { // Quality B, + { // Quality B "make_model": "Canon PowerShot G3 X", "dcraw_matrix": [ 9701,-3857,-921,-3149,11537,1817,-786,1817,5147 ], // DNG_V9.1.1 D65 "raw_crop": [ 128, 36, 5480, 3656 ], // Default official 3/2 frame 5472X3648, 4pix borders, Left Border 132-4, Top border 40-4 @@ -1081,25 +1038,25 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "white": 16300 } }, - { // Quality B, - "make_model": [ "Canon PowerShot G7 X", "Canon PowerShot G7 X Mark II" ], + { // Quality B, + "make_model": "Canon PowerShot G7 X", "dcraw_matrix": [ 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 ], // DNG_V8.7 D65 - // "raw_crop": [ 116, 24, 5504, 3680 ], // Sensor size 5632x3710. Largest useful frame 120-5616X28-3702 = 5504x3682, 4pix RTborders, Left Border 120-4, Top border 28-4 + //"raw_crop": [ 116, 24, 5504, 3680 ], // Sensor size 5632x3710. Largest useful frame 120-5616X28-3702 = 5504x3682, 4pix RTborders, Left Border 120-4, Top border 28-4 "raw_crop": [ 128, 36, 5480, 3656 ], // Default official 3/2 frame 5472X3648, 4pix borders, Left Border 132-4, Top border 40-4 "masked_areas": [ 40, 4, 3680, 76 ], "ranges": { "white": 4080 } }, - { // Quality B, - "make_model": [ "Canon PowerShot G5 X", "Canon PowerShot G9 X" ], + { // Quality B, + "make_model": [ "Canon PowerShot G5 X", "Canon PowerShot G9 X", "Canon PowerShot G7 X Mark II" ], "dcraw_matrix": [ 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 ], // DNG_V8.7 D65 - // "raw_crop": [ 116, 24, 5504, 3680 ], // Sensor size 5632x3710. Largest useful frame 120-5616X28-3702 = 5504x3682, 4pix RTborders, Left Border 120-4, Top border 28-4 + //"raw_crop": [ 116, 24, 5504, 3680 ], // Sensor size 5632x3710. Largest useful frame 120-5616X28-3702 = 5504x3682, 4pix RTborders, Left Border 120-4, Top border 28-4 "raw_crop": [ 128, 36, 5480, 3656 ], // Default official 3/2 frame 5472X3648, 4pix borders, Left Border 132-4, Top border 40-4 "masked_areas": [ 40, 4, 3680, 76 ], "ranges": { "white": 16300 } }, - { // Quality A, changes for raw crop which is wrong (larger) in Dcraw + { // Quality A, changes for raw crop which is wrong (larger) in dcraw "make_model": "Canon PowerShot S120", "dcraw_matrix": [ 6961,-1685,-695,-4625,12945,1836,-1114,2152,5518 ], "raw_crop": [ 120, 30, 4024, 3030 ], @@ -1120,48 +1077,55 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "dcraw_matrix": [ 12297,-4882,-1202,-2106,10691,1623,-88,1312,4790 ] // DNG_v8.5 D65 }, - { // Quality B, + { // Quality B "make_model": [ "FUJIFILM X100S", "FUJIFILM X100T" ], "dcraw_matrix": [ 10592,-4262,-1008,-3514,11355,2465,-870,2025,6386 ], // DNG_v8.7 D65 "ranges": { "white": 16100 } - }, - { // Quality B, + }, + + { // Quality B "make_model": "FUJIFILM X70", "dcraw_matrix": [ 10450,-4329,-878,-3217,11105,2421,-752,1758,6519 ], // DNG_v9.4 D65 - // "raw_crop": [ 4, 0, 4988, 3296 ], // full raw 4992,3296, fuji official 4936,3296 - experimental crop + //"raw_crop": [ 4, 0, 4988, 3296 ], // full raw 4992,3296, fuji official 4936,3296 - experimental crop "ranges": { "white": 16100 } - }, + }, - { // Quality B + { // Quality B "make_model": "FUJIFILM X-A2", "dcraw_matrix": [ 10763,-4560,-917,-3346,11311,2322,-475,1135,5843 ], // DNG D65 "ranges": { "white": 4050 } }, - { // Quality B + { // Quality B + "make_model": "FUJIFILM X-A3", + "dcraw_matrix": [ 12407,-5222,-1086,-2971,11116,2120,-294,1029,5284 ], // DNGv9.8 D65 + "ranges": { "white": 4050 } + }, + + { // Quality B "make_model": [ "FUJIFILM X-T1", "FUJIFILM X-T10", "FUJIFILM X-E2" ], "dcraw_matrix": [ 8458,-2451,-855,-4597,12447,2407,-1475,2482,6526 ], // DNG D65 -// "dcraw_matrix": [ 9289,-3279,-632,-3539,11137,2758,-1049,1950,6544 ], // X-RITE D55 -// "raw_crop": [ 4, 0, 4936, 3296 ], // full raw 4992,3296, fuji official 4936,3296 - experimental crop + //"dcraw_matrix": [ 9289,-3279,-632,-3539,11137,2758,-1049,1950,6544 ], // X-RITE D55 + //"raw_crop": [ 4, 0, 4936, 3296 ], // full raw 4992,3296, fuji official 4936,3296 - experimental crop "ranges": { "white": 16100 } }, - { // Quality B + { // Quality B "make_model": "FUJIFILM X-E2S", "dcraw_matrix": [ 11562,-5118,-961,-3022,11007,2311,-525,1569,6097 ], // DNG_v9.4 D65 "ranges": { "white": 16100 } }, - { // Quality B + { // Quality B "make_model": "FUJIFILM X-PRO1", "dcraw_matrix": [ 10413,-3996,-993,-3721,11640,2361,-733,1540,6011 ], // DNG_v9.4 D65 "ranges": { "white": 4080 } }, - { // Quality B + { // Quality B "make_model": [ "FUJIFILM X-PRO2", "FUJIFILM X-T2" ], "dcraw_matrix": [ 11434,-4948,-1210,-3746,12042,1903,-666,1479,5235 ], // DNG_v9.4 D65 - // "raw_crop": [ 0, 0, 6032, 4032 ], // full raw 6160,4032, Usable 6032,4032 - experimental crop + //"raw_crop": [ 0, 0, 6032, 4032 ], // full raw 6160,4032, Usable 6032,4032 - experimental crop "ranges": { "white": 16100 } }, @@ -1182,6 +1146,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "dcraw_matrix": [ 10068,-4043,-1068,-5319,14268,1044,-765,1701,6522 ], // DCP D65 "raw_crop": [ 4, 4, -4, -4 ] // full raw 6016x4016, Official 6000x4000 }, + { // Quality B, Matrix from Adobe's dcp D65 instead of the internal in Leica's DNG "make_model": "LEICA SL (Typ 601)", "dcraw_matrix": [ 11492,-4930,-1188,-5593,14673,873,-609,1474,6343 ], // DNGv9.3 D65 @@ -1198,224 +1163,245 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { // Quality A "make_model": [ "Nikon 1 V3", "Nikon 1 J4" ], // Same format "dcraw_matrix": [ 5958,-1559,-571,-4021,11453,2939,-634,1548,5087 ], // matrix from DNG_v8.5 d65 - // "dcraw_matrix": [ 5306,-1066,-469,-3865,11189,3076,-399,1341,5120 ], // matrix dXo D50, - "ranges": { "white": 4080 } // Black is auto extracted from exif, lower WL to 4080 from 4095 due to some non linearity detected at raw highlights + //"dcraw_matrix": [ 5306,-1066,-469,-3865,11189,3076,-399,1341,5120 ], // matrix dXo D50, + "ranges": { "white": 4080 } // Black is auto extracted from Exif, lower WL to 4080 from 4095 due to some non linearity detected at raw highlights }, - { // Quality B, + { // Quality B "make_model": "Nikon 1 J5", // "dcraw_matrix": [ 7520,-2518,-645,-3844,12102,1945,-913,2249,6835 ], // DNG_v9.1 D65 - // "dcraw_matrix": [ 7651,-2102,-751,-3299,11101,1651,-1011,2242,5770 ], // matrix from ICC converted to Dcraw format XYZ on ImagingResource stillife sample + //"dcraw_matrix": [ 7651,-2102,-751,-3299,11101,1651,-1011,2242,5770 ], // matrix from ICC converted to dcraw format XYZ on ImagingResource still life sample "ranges": { - "white": [ - { "iso": [ 160, 200 ], "levels": 4000 }, // typical G1/G2 4020-4028, R/B 4088 - { "iso": [ 400, 800, 1600, 3200 ], "levels": 4000 }, // g1/g2 4030-4040, r/b 4088 - { "iso": [ 6400, 12800 ], "levels": 4080 } // 4090 - ] - } + "white": [ + { "iso": [ 160, 200 ], "levels": 4000 }, // typical G1/G2 4020-4028, R/B 4088 + { "iso": [ 400, 800, 1600, 3200 ], "levels": 4000 }, // g1/g2 4030-4040, r/b 4088 + { "iso": [ 6400, 12800 ], "levels": 4080 } // 4090 + ] + } }, - { // Quality A, + { // Quality A "make_model": "Nikon 1 S2", // "dcraw_matrix": [ 6612,-1342,-618,-3338,11055,2623,-174,1792,5075 ], // matrix from DNG_v8.5 d65 - "ranges": { "white": 4080 } // BL autodetected from exif + "ranges": { "white": 4080 } // BL autodetected from Exif }, -// For all Nikon Dslrs which have multiple bitdepth options (14 and 12 bit) we define the 14-bit value and RT adapts it to 12-bit +// For all Nikon DSLRs which have multiple bitdepth options (14- and 12-bit) we define the 14-bit value and RT adapts it to 12-bit // when a 12-bit bitdepth is detected (WL12 = WL14*4095/16383) - { // quality B, samples by Johan Thor at RT.Issues, measures at long exposures with LENR are missing - // but a safety margin is included - aperture scaling makes no significant difference - "make_model": "Nikon D3S", - "dcraw_matrix": [ 8828,-2406,-694,-4874,12603,2541,-660,1509,7587 ], // dcp d65 - "ranges": { - "white": [ - { "iso": [ 100, 125, 160, 200, 250, 320, 400, 500 ], "levels": 15520 }, // typical G1,G2 15520-15800 R,B 16383 - { "iso": [ 640, 800, 1000, 1250 ], "levels": 15400 }, // typical G1,G2 15520-15800, R,B 16383 - { "iso": [ 1600, 2000, 2500 ], "levels": 15300 }, // typical G1,G2 15520-15800, R,B 16383 - { "iso": [ 3200, 4000, 5000, 6400 ], "levels": 15300 }, // typical G1/G2 15400-15800, R,B 16383 - { "iso": [ 8000, 10000 ], "levels": 15000 }, // typical G1/G2 15400-15800, R,B 16383 - { "iso": [ 12800, 16000 ], "levels": 14500 }, // typical G1/G2 15400-15800, R,B 16383 - { "iso": [ 20000, 25600 ], "levels": 13300 }, // typical G1/G2 15400-15800, R,B 16383 - { "iso": [ 51200, 102400 ], "levels": 12000 } // typical G1,G1 16270-16350, R,B 16383 - ], - "white_max": 16383 - } + { // Quality B, samples by Johan Thor at RT.Issues, measures at long exposures with LENR are missing + // but a safety margin is included - aperture scaling makes no significant difference + "make_model": "Nikon D3S", + "dcraw_matrix": [ 8828,-2406,-694,-4874,12603,2541,-660,1509,7587 ], // dcp d65 + "ranges": { + "white": [ + { "iso": [ 100, 125, 160, 200, 250, 320, 400, 500 ], "levels": 15520 }, // typical G1,G2 15520-15800 R,B 16383 + { "iso": [ 640, 800, 1000, 1250 ], "levels": 15400 }, // typical G1,G2 15520-15800, R,B 16383 + { "iso": [ 1600, 2000, 2500 ], "levels": 15300 }, // typical G1,G2 15520-15800, R,B 16383 + { "iso": [ 3200, 4000, 5000, 6400 ], "levels": 15300 }, // typical G1/G2 15400-15800, R,B 16383 + { "iso": [ 8000, 10000 ], "levels": 15000 }, // typical G1/G2 15400-15800, R,B 16383 + { "iso": [ 12800, 16000 ], "levels": 14500 }, // typical G1/G2 15400-15800, R,B 16383 + { "iso": [ 20000, 25600 ], "levels": 13300 }, // typical G1/G2 15400-15800, R,B 16383 + { "iso": [ 51200, 102400 ], "levels": 12000 } // typical G1,G1 16270-16350, R,B 16383 + ], + "white_max": 16383 + } }, - { // quality B, intermediate ISO samples missing + + { // Quality B, intermediate ISO samples missing "make_model": "Nikon D500", "dcraw_matrix": [ 8813,-3210,-1036,-4703,12868,2021,-1054,1940,6129 ], // DNG_v9.5 D65 "ranges": { - "white": [ // measured at integer ISOs. Safety margin per ISO groups according to expected WL spread after LENR - { "iso": [ 100, 200, 400, 800, 1600 ], "levels": [ 16300, 16100, 16300 ] }, // typical G1,G2 16180 R,B 16383 - { "iso": [ 3200, 6400 ], "levels": [ 16250, 16050, 16250 ] }, // typical G1,G2,16200 R,B 16383 - { "iso": [ 12800, 25600 ], "levels": 16000 }, // typical G1,G2, R,B 16383 - { "iso": [ 51200, 102400 ], "levels": 15800 }, // typical G1,G2, R,B 16383 - { "iso": [ 204800, 409600 ], "levels": 15500 }, // typical G1,G2,R,B 16383 - { "iso": [ 819200, 1638400 ], "levels": 15000 } // typical G1,G2, R,B 16383 - ], - "white_max": 16383 - } - }, + "white": [ // measured at integer ISOs. Safety margin per ISO groups according to expected WL spread after LENR + { "iso": [ 100, 200, 400, 800, 1600 ], "levels": [ 16300, 16100, 16300 ] }, // typical G1,G2 16180 R,B 16383 + { "iso": [ 3200, 6400 ], "levels": [ 16250, 16050, 16250 ] }, // typical G1,G2,16200 R,B 16383 + { "iso": [ 12800, 25600 ], "levels": 16000 }, // typical G1,G2, R,B 16383 + { "iso": [ 51200, 102400 ], "levels": 15800 }, // typical G1,G2, R,B 16383 + { "iso": [ 204800, 409600 ], "levels": 15500 }, // typical G1,G2,R,B 16383 + { "iso": [ 819200, 1638400 ], "levels": 15000 } // typical G1,G2, R,B 16383 + ], + "white_max": 16383 + } + }, - { // quality B, lacks aperture and ISO scaling, known to exist, but little to gain as the levels are so close to white_max + { // Quality B, lacks aperture and ISO scaling, known to exist, but little to gain as the levels are so close to white_max "make_model": "Nikon D7000", "dcraw_matrix": [ 7530,-1942,-255,-4318,11390,3362,-926,1694,7649 ], // matrix provided by Tanveer(tsk1979) "ranges": { - // measured at ISO 100. ISO differences not measured, but known to exist - "white": [ 16300, 15700, 16300 ], // typical R 16383, G 15778, B 16383 - "white_max": 16383 - // aperture scaling not measured, but known to exist, at f/1.8 the G channels hits white_max - } + // measured at ISO 100. ISO differences not measured, but known to exist + "white": [ 16300, 15700, 16300 ], // typical R 16383, G 15778, B 16383 + "white_max": 16383 + // aperture scaling not measured, but known to exist, at f/1.8 the G channels hits white_max + } }, - { // quality B, + + { // Quality B "make_model": "NIKON COOLPIX A", "dcraw_matrix": [ 8198,-2239,-724,-4871,12389,2798,-1043,2050,7181 ], // dng_d65 "ranges": { - "white": [ - { "iso": [ 100, 125, 160, 200, 250, 320, 400, 500, 640, 800 ], "levels": [ 16300, 15700, 16300 ] }, // typical G1,G2 15760-15800 R,B 16383 - { "iso": [ 1000, 1250, 1600, 2000, 2500, 3200 ], "levels": 16300 }, // typical G1,G2, R,B 16383 - { "iso": [ 4000, 5000, 6400 ], "levels": 16200 }, // typical G1,G2, R,B 16383 - { "iso": [ 8000, 10000, 12800 ], "levels": 16000 }, // typical G1,G2,R,B 16383 - { "iso": [ 16000, 20000, 25600 ], "levels": 15700 } // typical G1,G2, R,B 16383 - ], - "white_max": 16383 - } + "white": [ + { "iso": [ 100, 125, 160, 200, 250, 320, 400, 500, 640, 800 ], "levels": [ 16300, 15700, 16300 ] }, // typical G1,G2 15760-15800 R,B 16383 + { "iso": [ 1000, 1250, 1600, 2000, 2500, 3200 ], "levels": 16300 }, // typical G1,G2, R,B 16383 + { "iso": [ 4000, 5000, 6400 ], "levels": 16200 }, // typical G1,G2, R,B 16383 + { "iso": [ 8000, 10000, 12800 ], "levels": 16000 }, // typical G1,G2,R,B 16383 + { "iso": [ 16000, 20000, 25600 ], "levels": 15700 } // typical G1,G2, R,B 16383 + ], + "white_max": 16383 + } }, - { // Quality B, NO LENR SAMPLES - "make_model": "Nikon D5", - "dcraw_matrix": [ 9200,-3522,-992,-5755,13803,2117,-753,1486,6338 ], // adobe dng_v9.5 d65 - "ranges": { "black": 0, "white": 16300 } // WL typical 16383 set to 16300 for safety + { // Quality B, no LENR samples + "make_model": "Nikon D5", + "dcraw_matrix": [ 9200,-3522,-992,-5755,13803,2117,-753,1486,6338 ], // adobe dng_v9.5 d65 + "ranges": { "black": 0, "white": 16300 } // WL typical 16383 set to 16300 for safety }, { // Quality B - "make_model": "Nikon D3400", - "dcraw_matrix": [ 6988,-1384,-714,-5631,13410,2447,-1485,2204,7318 ], // adobe dng_v9.7 d65 - "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety + "make_model": "Nikon D3400", + "dcraw_matrix": [ 6988,-1384,-714,-5631,13410,2447,-1485,2204,7318 ], // adobe dng_v9.7 d65 + "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety }, { // Quality B - "make_model": "Nikon D5300", - "dcraw_matrix": [ 6988,-1384,-714,-5631,13410,2447,-1485,2204,7318 ], // adobe dng_v8.8 d65 - "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety + "make_model": "Nikon D5300", + "dcraw_matrix": [ 6988,-1384,-714,-5631,13410,2447,-1485,2204,7318 ], // adobe dng_v8.8 d65 + "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety }, { // Quality B - "make_model": "Nikon D5500", - "dcraw_matrix": [ 8821,-2938,-785,-4178,12142,2287,-824,1651,6860 ], // adobe dng_v9.0 d65 - "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety + "make_model": [ "Nikon D5500", "Nikon D5600" ], + "dcraw_matrix": [ 8821,-2938,-785,-4178,12142,2287,-824,1651,6860 ], // adobe dng_v9.8 d65 + "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety }, { // Quality B - "make_model": "Nikon D7200", - "dcraw_matrix": [ 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 ], // adobe dng_v9.0 d65 - "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety, + "make_model": "Nikon D7200", + "dcraw_matrix": [ 8322,-3112,-1047,-6367,14342,2179,-988,1638,6394 ], // adobe dng_v9.0 d65 + "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety, }, - { // quality B, samples by joachip at RT forums, are measures at long exposures with LongExposureNoiseReduction - // aperture scaling known to exist, but little to gain as the levels are so close to white_max + { // Quality B, samples by joachip at RT forums, are measures at long exposures with LongExposureNoiseReduction + // aperture scaling known to exist, but little to gain as the levels are so close to white_max "make_model": "Nikon D600", "dcraw_matrix": [ 8178,-2245,-609,-4857,12394,2776,-1207,2086,7298 ], // dcp d65 - // "raw_crop": [ 0, 0, 6034, 4028 ], // dcraw + //"raw_crop": [ 0, 0, 6034, 4028 ], // dcraw "ranges": { "white": [ - { "iso": [ 50, 100 ], "levels": [ 15800, 15800, 15350 ] }, // typical G1/G2/R 15879, B 15395-15670 lowered to 15800, 15350, 3969 B3917 - { "iso": [ 200, 400, 800 ], "levels": [ 16300, 15700, 16300 ] }, // 15878, 16383 - { "iso": 1000, "levels": [ 16300, 16100, 16300 ] }, // 12-bit lossless r4095, 3981-10, b4041- 12-bit lossy r,g1,g2 3961 - b3917, - { "iso": 1600, "levels": [ 16300, 16100, 16300 ] }, // 16145-165, 16383 - { "iso": [ 3200, 6400, 12800, 25600 ], "levels": [ 16300, 16300, 16300 ] } // 16383 - ], - "white_max": 16383 - } - }, - { // quality B, missing WL measures at intermediate ISOs (160-250-320 ..) and at long exposures with LongExposureNoiseReduction set to ON - // aperture scaling known to exist, but little to gain as the levels are so close to white_max + { "iso": [ 50, 100 ], "levels": [ 15800, 15800, 15350 ] }, // typical G1/G2/R 15879, B 15395-15670 lowered to 15800, 15350, 3969 B3917 + { "iso": [ 200, 400, 800 ], "levels": [ 16300, 15700, 16300 ] }, // 15878, 16383 + { "iso": 1000, "levels": [ 16300, 16100, 16300 ] }, // 12-bit lossless r4095, 3981-10, b4041- 12-bit lossy r,g1,g2 3961 - b3917, + { "iso": 1600, "levels": [ 16300, 16100, 16300 ] }, // 16145-165, 16383 + { "iso": [ 3200, 6400, 12800, 25600 ], "levels": [ 16300, 16300, 16300 ] } // 16383 + ], + "white_max": 16383 + } + }, + + { // Quality B, missing WL measures at intermediate ISOs (160-250-320 ..) and at long exposures with LongExposureNoiseReduction set to ON + // aperture scaling known to exist, but little to gain as the levels are so close to white_max "make_model": "Nikon D610", "dcraw_matrix": [ 8178,-2245,-609,-4857,12394,2776,-1207,2086,7298 ], // dcp d65 "raw_crop": [ 0, 0, 6034, 4028 ], "ranges": { "white": [ - { "iso": [ 50, 100 ], "levels": [ 15800, 15700, 15800 ] }, // typical G1/G2 15778, R/B 15879 lowered to 15700, 15800 for possible WL distribution under LENR - { "iso": [ 200, 400, 800 ], "levels": [ 16300, 15700, 16300 ] }, // 15878, 16383 - { "iso": 1600, "levels": [ 16300, 16100, 16300 ] }, // 16145-165, 16383 - { "iso": [ 3200, 6400, 12800, 25600 ], "levels": [ 16300, 16300, 16300 ] } // 16383 - ], - "white_max": 16383 - } - }, + { "iso": [ 50, 100 ], "levels": [ 15800, 15700, 15800 ] }, // typical G1/G2 15778, R/B 15879 lowered to 15700, 15800 for possible WL distribution under LENR + { "iso": [ 200, 400, 800 ], "levels": [ 16300, 15700, 16300 ] }, // 15878, 16383 + { "iso": 1600, "levels": [ 16300, 16100, 16300 ] }, // 16145-165, 16383 + { "iso": [ 3200, 6400, 12800, 25600 ], "levels": [ 16300, 16300, 16300 ] } // 16383 + ], + "white_max": 16383 + } + }, - { // quality B; Data from RusselCottrell at RT forums. sensor is not uniform + { // Quality B, data from RusselCottrell at RT forums. sensor is not uniform "make_model": "Nikon D700", "dcraw_matrix": [ 8139,-2171,-663,-8747,16541,2295,-1925,2008,8093 ], - // "dcraw_matrix": [ 9336,-3405,14,-7321,14779,2764,-914,1171,8248 ], // illuminant A + //"dcraw_matrix": [ 9336,-3405,14,-7321,14779,2764,-914,1171,8248 ], // illuminant A "ranges": { "white": [ 15500, 15500, 15500 ] } - // Non linearities start at 15500 (hi ISOs) 15850 (low ISOs) with long exposures (>2sec) and LENR ON .. nominal 15892 - // white 15500 is correct for 14-bit files, for 12-bit files RT auto_calculates it 15500*4095/16383=3874 - }, + // Non linearities start at 15500 (hi ISOs) 15850 (low ISOs) with long exposures (>2sec) and LENR ON .. nominal 15892 + // white 15500 is correct for 14-bit files, for 12-bit files RT auto_calculates it 15500*4095/16383=3874 + }, - { // Quality B, - "make_model": "Nikon D750", - "dcraw_matrix": [ 9020,-2890,-715,-4535,12436,2348,-934,1919,7086 ], // adobe dcp d65 DNGv8.7 - "ranges": { "white": 16300 } // WL values for 14-bit files, RT auto adapts it for 12-bit files. TypicalWL 16383 set to 16300 for safety - }, + { // Quality B, + "make_model": "Nikon D750", + "dcraw_matrix": [ 9020,-2890,-715,-4535,12436,2348,-934,1919,7086 ], // adobe dcp d65 DNGv8.7 + "ranges": { "white": 16300 } // WL values for 14-bit files, RT auto adapts it for 12-bit files. TypicalWL 16383 set to 16300 for safety + }, - { // quality B; Data from RussellCottrell at RT forums. Largest aperture scale factor is 1.013, about 1/50th of a stop + { // Quality B, data from RussellCottrell at RT forums. Largest aperture scale factor is 1.013, about 1/50th of a stop "make_model": "Nikon D800E", "dcraw_matrix": [ 7866,-2108,-555,-4869,12483,2681,-1176,2069,7501 ], // D800/D800E from dcraw.c "ranges": { "white": [ - { "iso": [ 100, 125, 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250 ], "levels": [ 16300, 15700, 16300 ] }, // 15779-15781 - { "iso": [ 1600 ], "levels": 16000 }, // 16085-16113 - { "iso": [ 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 16300 } // 16383 - ] - } - }, - { // quality B, WL set at 16300 from nominal 16380 for possible non linearities with LENR + { "iso": [ 100, 125, 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250 ], "levels": [ 16300, 15700, 16300 ] }, // 15779-15781 + { "iso": [ 1600 ], "levels": 16000 }, // 16085-16113 + { "iso": [ 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 16300 } // 16383 + ] + } + }, + + { // Quality B, WL set at 16300 from nominal 16380 for possible non linearities with LENR "make_model": "Nikon D810", "dcraw_matrix": [ 9369,-3195,-791,-4488,12430,2301,-893,1796,6872 ], // dcp_v8.6 d65 "raw_crop": [ 0, 0, 7380, 4928 ], // Official raw crop 7380x4928, "ranges": { "white": 16300 } // WL values for 14-bit files, RT auto adapts it for 12-bit files. Typical WL at 16383 }, - { // Quality b, 16Mp and 64Mp raw frames + { // Quality B, 16Mp and 64Mp raw frames "make_model": "OLYMPUS E-M5MarkII", "dcraw_matrix": [ 9422,-3258,-711,-2655,10898,2015,-512,1354,5512 ], // DNG_v8.8 D65 "raw_crop": [ 0, 0, -6, -6 ], // largest valid, full 64Mp 9280x6938, official crop 0 0 9216 6912 "ranges": { "white": [ - { "iso": [ 100, 200 ], "levels": 3950 }, // normal 4080-4095, HR Dpreview 4047, IR 3956 - { "iso": [ 400, 800, 1600, 3200 ], "levels": 4070 }, // 4070-4095 - { "iso": [ 6400, 12800, 25600 ], "levels": 4040 } // 4000-4095 - ] - } + { "iso": [ 100, 200 ], "levels": 3950 }, // normal 4080-4095, HR Dpreview 4047, IR 3956 + { "iso": [ 400, 800, 1600, 3200 ], "levels": 4070 }, // 4070-4095 + { "iso": [ 6400, 12800, 25600 ], "levels": 4040 } // 4000-4095 + ] + } }, + { // Quality B, 20Mp and 80Mp raw frames "make_model": "OLYMPUS PEN-F", "dcraw_matrix": [ 9476,-3182,-765,-2613,10958,1893,-449,1315,5268 ], // dng_v9.5 D65 - // "raw_crop": [ 0, 0, 10372, -7780 ], // Highres mode largest valid, full 80Mp 10400X7796, official crop 10 10 10368 7776 + //"raw_crop": [ 0, 0, 10372, -7780 ], // Highres mode largest valid, full 80Mp 10400X7796, official crop 10 10 10368 7776 "ranges": { "white": [ - { "iso": [ 100, 200 ], "levels": 3950 }, // normal 4080-4095, HR Dpreview 4047, IR 3956 - { "iso": [ 400, 800, 1600, 3200 ], "levels": 4070 }, // 4070-4095 - { "iso": [ 6400, 12800, 25600 ], "levels": 4040 } // 4000-4095 - ] - } + { "iso": [ 100, 200 ], "levels": 3950 }, // normal 4080-4095, HR Dpreview 4047, IR 3956 + { "iso": [ 400, 800, 1600, 3200 ], "levels": 4070 }, // 4070-4095 + { "iso": [ 6400, 12800, 25600 ], "levels": 4040 } // 4000-4095 + ] + } }, - { // Quality b, missing per ISO samples + { // Quality B, 20Mp and 80Mp raw frames, + "make_model": "OLYMPUS E-M1MarkII", + //"dcraw_matrix": [ 9422,-3258,-711,-2655,10898,2015,-512,1354,5512 ], // E-M5II dng_v9.5 D65 + "dcraw_matrix": [ 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 ], // beta, dng_v9.8 D65 + "raw_crop": [ 8, 8, -16, -8 ], // full raw 5240X3912, jpeg top12,left12,5184x3888, full hires 10400X7792, jpeg crop 8,8,10368x7776 + "ranges": { + "white": [ + { "iso": [ 64, 100, 125, 160, 200, 250, 320, 400 ], "levels": 4090 }, // normal 4095 + { "iso": [ 500, 640, 800, 1000, 1600 ], "levels": 4080 }, // 4085-4095 + { "iso": [ 2000, 2500, 3200, 4000, 5000, 6400 ], "levels": 4060 }, // 4085-4095 + { "iso": [ 12800, 25600, 51200 ], "levels": 4060 } // guess + ] + } + }, + + { // Quality B, missing per ISO samples "make_model": "OLYMPUS E-M1", "dcraw_matrix": [ 7687,-1984,-606,-4327,11928,2721,-1381,2339,6452 ], // dng d65 "ranges": { "white": 4080 } // nominal 4095-4094, spread with some settings as long exposure }, - { // Quality b, crop correction - "make_model": [ "OLYMPUS E-M10", "OLYMPUS E-M10 Mark II" ], + { // Quality B, crop correction + "make_model": [ "OLYMPUS E-M10", "OLYMPUS E-M10MarkII" ], "dcraw_matrix": [ 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 ], "raw_crop": [ 0, 0, 4624, 3472 ], // largest valid - full frame is 4640x3472 -// "raw_crop": [ 4, 4, 4616, 3464 ], // olympus jpeg crop 8, 8, 4608, 3456 + //"raw_crop": [ 4, 4, 4616, 3464 ], // olympus jpeg crop 8, 8, 4608, 3456 "ranges": { "white": 4080 } }, + { // Quality A, white level correction "make_model": "OLYMPUS E-PM2", "dcraw_matrix": [ 8380,-2630,-639,-2887,10725,2496,-627,1427,5438 ], @@ -1423,8 +1409,8 @@ Quality X: unknown, ie we knowing to little about the camera properties to know }, { // Quality B, with long exposure noise reduction White Level gets WL-BL = around 256_12-bit levels less - "make_model": "OLYMPUS E-PL7", - "dcraw_matrix": [ 9197,-3190,-659,-2606,10830,2039,-458,1250,5458 ], // DNG_V8.7 D65 + "make_model": [ "OLYMPUS E-PL7", "OLYMPUS E-PL8" ], + "dcraw_matrix": [ 9197,-3190,-659,-2606,10830,2039,-458,1250,5458 ], // DNG_v9.8 D65 "ranges": { "white": 4080 } // nominal 4093 }, @@ -1434,287 +1420,338 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "white": 4050 } // safe for worst case detected, nominal is 4093 }, - /* since Dcraw_v9.21 Panasonic base BL is read from exif (tags 0x001c BlackLevelRed15 is BL offset. - Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset, 0x001d BlackLevelGreen, 0x001e BlackLevelBlue - and we define here the needed offset of around 15. The total BL is base+offset */ +/* Since dcraw_v9.21 Panasonic base BL is read from Exif (tags 0x001c BlackLevelRed15 is BL offset. + dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset, 0x001d BlackLevelGreen, 0x001e BlackLevelBlue + and we define here the needed offset of around 15. The total BL is base+offset +*/ - { // Quality B, CameraPhone, some samples are missing but has the same sensor as FZ1000 .. + { // Quality B, CameraPhone, some samples are missing but has the same sensor as FZ1000 .. "make_model": [ "Panasonic DMC-CM1", "Panasonic DMC-CM10" ], "dcraw_matrix": [ 8770,-3194,-820,-2871,11281,1803,-513,1552,4434 ], // dcp_v8.7 d65 "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 80, "levels": 3600 }, // exif:3277 distribution peak at 3700 up to +/- 100 - { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // exif 4095 distribution 4050-4095 - { "iso": [ 3200, 6400, 12600, 25600 ], "levels": 4080 } // exif 4095 distribution 4080-4095 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base BL from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 80, "levels": 3600 }, // Exif:3277 distribution peak at 3700 up to +/- 100 + { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // Exif 4095 distribution 4050-4095 + { "iso": [ 3200, 6400, 12600, 25600 ], "levels": 4080 } // Exif 4095 distribution 4080-4095 + ] + } }, - { // Quality A , replicated from rawimage.cc + { // Quality A, replicated from rawimage.cc "make_model": "Panasonic DMC-FZ150", "dcraw_matrix": [ 10435,-3208,-72,-2293,10506,2067,-486,1725,4682 ], // RT, copy from custom dcp d55 - "ranges": { "black": 15, "white": 4050 } // 15 is BL offset. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "ranges": { "black": 15, "white": 4050 } // 15 is BL offset. dcraw/RT read the base offset from Exif and calculates total BL = BLbase+BLoffset }, - { // Quality B, + { // Quality B, "make_model": [ "Panasonic DMC-FZ300", "Panasonic DMC-FZ330" ], "dcraw_matrix": [ 8378,-2798,-769,-3068,11410,1877,-538,1792,4623 ], // DNG-V9.1.1 - "ranges": { "black": 15, "white": 4050 } // 15 is BL offset. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "ranges": { "black": 15, "white": 4050 } // 15 is BL offset. dcraw/RT read the base offset from Exif and calculates total BL = BLbase+BLoffset }, - { // Quality A, samples by helices at Rt forums + { // Quality A, samples by helices at RT forums "make_model": [ "Panasonic DMC-FZ1000", "Leica V-LUX (Typ 114)" ], "dcraw_matrix": [ 7830,-2696,-763,-3325,11667,1866,-641,1712,4824 ], // dcp_v8.6 d65 "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 80, "levels": 3600 }, // exif:3277 distribution peak at 3700 up to +/- 100 - { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // exif 4095 distribution 4050-4095 - { "iso": [ 3200, 6400, 12600, 25600 ], "levels": 4080 } // exif 4095 distribution 4080-4095 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base BL from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 80, "levels": 3600 }, // Exif:3277 distribution peak at 3700 up to +/- 100 + { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // Exif 4095 distribution 4050-4095 + { "iso": [ 3200, 6400, 12600, 25600 ], "levels": 4080 } // Exif 4095 distribution 4080-4095 + ] + } }, - { // Quality A, samples by helices at Rt forums and Chris Power at github + + { // Quality B, + "make_model": [ "Panasonic DMC-FZ2500", "Panasonic DMC-FZ2000", "Panasonic DMC-FZH1" ], + "dcraw_matrix": [ 7386,-2443,-743,-3437,11864,1757,-608,1660,4766 ], // dcp_v9.8 d65 + "ranges": { + "black": 15, // 15 is BL offset. dcraw/RT read the base BL from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 80, "levels": 3600 }, // Exif:3277 distribution peak at 3700 up to +/- 100 + { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // Exif 4095 distribution 4050-4095 + { "iso": [ 3200, 6400, 12600, 25600 ], "levels": 4080 } // Exif 4095 distribution 4080-4095 + ] + } + }, + + { // Quality A, samples by helices at RT forums and Chris Power at github "make_model": [ "Panasonic DMC-ZS100", "Panasonic DMC-ZS110", "Panasonic DMC-TZ100", "Panasonic DMC-TZ101", "Panasonic DMC-TZ110", "Panasonic DMC-TX1" ], "dcraw_matrix": [ 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 ], // dcp_v8.6 d65 - "raw_crop": [ 4, 4, -4, -4 ], // full raw frame 5488x3664 exif crop 5472X3648 with 8pixel borders. Set the borders at 4 pixels which added with RT's 4 pixels border gives exactly the official frame. + "raw_crop": [ 4, 4, -4, -4 ], // full raw frame 5488x3664 Exif crop 5472X3648 with 8pixel borders. Set the borders at 4 pixels which added with RT's 4 pixels border gives exactly the official frame. "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 80, "levels": 3600 }, // exif:3277 distribution peak at 3700 up to +/- 100 - { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // exif 4095 distribution 4050-4095 - { "iso": [ 3200, 6400, 12600, 25600 ], "levels": 4080 } // exif 4095 distribution 4080-4095 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base BL from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 80, "levels": 3600 }, // Exif:3277 distribution peak at 3700 up to +/- 100 + { "iso": [ 100, 125, 200, 400, 800, 1600 ], "levels": 4050 }, // Exif 4095 distribution 4050-4095 + { "iso": [ 3200, 6400, 12600, 25600 ], "levels": 4080 } // Exif 4095 distribution 4080-4095 + ] + } }, - { // Quality A + + { // Quality A "make_model": [ "Panasonic DMC-LF1", "Leica C (Typ 112)" ], "dcraw_matrix": [ 9379,-3267,-816,-3227,11560,1881,-926,1928,5340 ], - "ranges": { "black": 15, "white": 4050 } // 15 is BL offset. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "ranges": { "black": 15, "white": 4050 } // 15 is BL offset. dcraw/RT read the base offset from Exif and calculates total BL = BLbase+BLoffset }, + { // Quality A "make_model": [ "Panasonic DMC-TZ60", "Panasonic DMC-TZ61", "Panasonic DMC-ZS40", "Panasonic DMC-ZS41" ], "dcraw_matrix": [ 8607,-2822,-808,-3755,11930,2049,-820,2060,5224 ], // matrix from Adobe dcp v8.4 - "raw_crop": [ 8, 8, -8, -8 ], // crop according to exif 4896 X 3672 plus 4 pixels borders. RT's frame gets smaller than Dcraw but works better with auto distortion - "ranges": { "black": 14, "white": 4050 } // 15 is BL offset. Dcraw/RT read the base offset from exif and calculates total BL = BLbase+BLoffset + "raw_crop": [ 8, 8, -8, -8 ], // crop according to Exif 4896 X 3672 plus 4 pixels borders. RT's frame gets smaller than dcraw but works better with auto distortion + "ranges": { "black": 14, "white": 4050 } // 15 is BL offset. dcraw/RT read the base offset from Exif and calculates total BL = BLbase+BLoffset }, - { // Quality B, + + { // Quality B "make_model": [ "Panasonic DMC-TZ70", "Panasonic DMC-TZ71", "Panasonic DMC-ZS50", "Panasonic DMC-ZS51" ], "dcraw_matrix": [ 8802,-3135,-789,-3151,11468,1904,-550,1745,4810 ], // DNG_V8.8 D65 - "raw_crop": [ 4, 4, -4, -4 ], // full raw 4/3 4144x3016 8,8,3008,4008 = 4000X3000. RT's frame gets smaller than Dcraw but works better with auto distortion + "raw_crop": [ 4, 4, -4, -4 ], // full raw 4/3 4144x3016 8,8,3008,4008 = 4000X3000. RT's frame gets smaller than dcraw but works better with auto distortion "ranges": { "black": 14, "white": 4050 } // 12+1+1 is BL offset }, - // Panasonic DMC-FZ150,G10,G1,G2,G3,G5,GF1,GF2,GF3 are included as overwrites of the same items of rawimage.cc to test the Dcraw9.21 patch +// Panasonic DMC-FZ150,G10,G1,G2,G3,G5,GF1,GF2,GF3 are included as overwrites of the same items of rawimage.cc to test the dcraw9.21 patch - { // Quality A, Replicated from rawimage.cc + { // Quality A, Replicated from rawimage.cc "make_model": [ "Panasonic DMC-G10", "Panasonic DMC-G2" ], "dcraw_matrix": [ 8310,-1811,-960,-4941,12990,2151,-1378,2468,6860 ], // Colin Walker "ranges": { - "black": 15, // 15 is black offset, Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": [ 100, 200, 400, 800 ], "levels": 3920 }, // exif:3967 distribution peak at 3967 +/- up to 50 - { "iso": [ 1600, 3200, 6400 ], "levels": 4060 } // exif 3967, histogram peak 4095 and distribution down to 4070 - ] - } - }, - { // Quality A, Replicated from rawimage.cc + "black": 15, // 15 is black offset, dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": [ 100, 200, 400, 800 ], "levels": 3920 }, // Exif:3967 distribution peak at 3967 +/- up to 50 + { "iso": [ 1600, 3200, 6400 ], "levels": 4060 } // Exif 3967, histogram peak 4095 and distribution down to 4070 + ] + } + }, + + { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-G1", "dcraw_matrix": [ 7477,-1615,-651,-5016,12769,2506,-1380,2475,7240 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": [ 100, 200, 400, 800 ], "levels": 3920 }, // exif:4095 distribution peak at 3977 +/- up to 50 - { "iso": [ 1600, 3200 ], "levels": 4060 } // exif 4095, histogram peak 4095 and distribution down to 4070 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": [ 100, 200, 400, 800 ], "levels": 3920 }, // Exif:4095 distribution peak at 3977 +/- up to 50 + { "iso": [ 1600, 3200 ], "levels": 4060 } // Exif 4095, histogram peak 4095 and distribution down to 4070 + ] + } }, + { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-G3", "dcraw_matrix": [ 6051,-1406,-671,-4015,11505,2868,-1654,2667,6219 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": 4060 } // exif:4095 normal distribution 4080-4095, 4070-4095 on long exposure NR + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": 4060 } // Exif:4095 normal distribution 4080-4095, 4070-4095 on long exposure NR }, + { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-G5", "dcraw_matrix": [ 7122,-2092,-419,-4643,11769,3283,-1363,2413,5944 ], // RT "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": 4060 } // exif:4095 normal distribution 4080-4095, 4070-4095 on long exposure NR + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": 4060 } // Exif:4095 normal distribution 4080-4095, 4070-4095 on long exposure NR }, + { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-GF1", "dcraw_matrix": [ 7863,-2080,-668,-4623,12331,2578,-1020,2066,7266 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": [ 100, 200, 400, 800 ], "levels": 3920 }, // exif:4095 distribution peak at 3977 +/- up to 50 - { "iso": [ 1600, 3200 ], "levels": 4060 } // exif 4095, histogram peak 4095 and distribution down to 4070 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": [ 100, 200, 400, 800 ], "levels": 3920 }, // Exif:4095 distribution peak at 3977 +/- up to 50 + { "iso": [ 1600, 3200 ], "levels": 4060 } // Exif 4095, histogram peak 4095 and distribution down to 4070 + ] + } }, { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-GF2", "dcraw_matrix": [ 7694,-1791,-745,-4917,12818,2332,-1221,2322,7197 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": 4050 } // exif:4095 normal distribution 4080-4095, 4050-4095 on long exposure NR + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": 4050 } // Exif:4095 normal distribution 4080-4095, 4050-4095 on long exposure NR }, + { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-GF3", "dcraw_matrix": [ 8074,-1846,-861,-5026,12999,2239,-1320,2375,7422 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": 4050 } // exif:4095 normal distribution 4080-4095, 4050-4095 on long exposure NR + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": 4050 } // Exif:4095 normal distribution 4080-4095, 4050-4095 on long exposure NR }, + { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-GH1", "dcraw_matrix": [ 6360,-1557,-375,-4201,11504,3086,-1378,2518,5843 ], // Colin Walker "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": [ 100, 200, 400, 800 ], "levels": 3930 }, // exif:4095 distribution peak at 3982 +/- up to 50 - { "iso": [ 1600, 3200 ], "levels": 4060 } // exif 4095, histogram peak 4095 and distribution down to 4070 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": [ 100, 200, 400, 800 ], "levels": 3930 }, // Exif:4095 distribution peak at 3982 +/- up to 50 + { "iso": [ 1600, 3200 ], "levels": 4060 } // Exif 4095, histogram peak 4095 and distribution down to 4070 + ] + } }, + { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-GH2", - // "dcraw_matrix": [ 6855,-1765,-456,-4223,11600,2996,-1450,2602,5761 ], // Colin Walker - disabled due to problems with underwater - "dcraw_matrix": [ 7780,-2410,-806,-3913,11724,2484,-1018,2390,5298 ], // Dcraw d65 + // "dcraw_matrix": [ 6855,-1765,-456,-4223,11600,2996,-1450,2602,5761 ], // Colin Walker - disabled due to problems with underwater + "dcraw_matrix": [ 7780,-2410,-806,-3913,11724,2484,-1018,2390,5298 ], // dcraw d65 "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": [ 100, 200, 400, 800 ], "levels": 3930 }, // exif:4095 distribution peak at 3982 +/- up to 50 - { "iso": [ 1600, 3200, 6400, 12800 ], "levels": 4060 } // exif 4095, histogram peak 4095 and distribution down to 4070 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": [ 100, 200, 400, 800 ], "levels": 3930 }, // Exif:4095 distribution peak at 3982 +/- up to 50 + { "iso": [ 1600, 3200, 6400, 12800 ], "levels": 4060 } // Exif 4095, histogram peak 4095 and distribution down to 4070 + ] + } }, { // Quality B, variable WL "make_model": "Panasonic DMC-GH3", "dcraw_matrix": [ 6559,-1752,-491,-3672,11407,2586,-962,1875,5130 ], // dcp d65 "ranges": { - "black": 16, // 16 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 125, "levels": 3500 }, // gaussian 3600-4095 - { "iso": [ 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 16, // 16 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 125, "levels": 3500 }, // gaussian 3600-4095 + { "iso": [ 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } }, { // Quality B, some ISO WLevels are safely guessed "make_model": "Panasonic DMC-GH4", "dcraw_matrix": [ 7122,-2108,-512,-3155,11201,2231,-541,1423,5045 ], // dng_v8.5 d65 "ranges": { - "black": 16, // 16 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 100, "levels": 2700 }, // gaussian center at 2870-2920 range +/- 150, exif 2111 - { "iso": 125, "levels": 3100 }, // guessed - { "iso": [ 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 16, // 16 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 100, "levels": 2700 }, // gaussian center at 2870-2920 range +/- 150, Exif 2111 + { "iso": 125, "levels": 3100 }, // guessed + { "iso": [ 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } }, - { // Quality A, + { // Quality A "make_model": "Panasonic DMC-GM1", "dcraw_matrix": [ 6770,-1895,-744,-5232,13145,2303,-1664,2691,5703 ], "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 125, "levels": 3100 }, // bell shape 3150-3650 - exif 2616 - { "iso": 160, "levels": 3600 }, // guessed from relative GX7 data - { "iso": [ 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 125, "levels": 3100 }, // bell shape 3150-3650 - Exif 2616 + { "iso": 160, "levels": 3600 }, // guessed from relative GX7 data + { "iso": [ 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } }, { // Quality B, uncertainty about ISO100 WL "make_model": "Panasonic DMC-GM5", "dcraw_matrix": [ 8238,-3244,-679,-3921,11814,2384,-836,2022,5852 ], // dng_v8.7 d65 "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 100, "levels": 2800 }, // bell shape 2850-3250 - exif 2111 - { "iso": [ 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 100, "levels": 2800 }, // bell shape 2850-3250 - Exif 2111 + { "iso": [ 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } }, - { // Quality A, + + { // Quality A "make_model": [ "Panasonic DMC-GX7", "Panasonic DMC-GF7", "Panasonic DMC-GF8" ], "dcraw_matrix": [ 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 ], "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 125, "levels": 3100 }, - { "iso": 160, "levels": 3600 }, - { "iso": [ 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 125, "levels": 3100 }, + { "iso": 160, "levels": 3600 }, + { "iso": [ 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } }, - { // Quality A, + { // Quality A "make_model": [ "Panasonic DMC-G7", "Panasonic DMC-G70" ], - "dcraw_matrix": [ 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 ],// DNG_v9.1 D65 + "dcraw_matrix": [ 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 ], // DNG_v9.1 D65 "ranges": { - "black": 16, // 16 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 100, "levels": 2300 }, // gaussian 2300-2700 exif_linearitylimit 2111 - { "iso": 125, "levels": 3180 }, // gaussian 3200-3600 exif_linearitylimit 2626 - { "iso": [ 160, 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 16, // 16 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 100, "levels": 2300 }, // gaussian 2300-2700 Exif_linearitylimit 2111 + { "iso": 125, "levels": 3180 }, // gaussian 3200-3600 Exif_linearitylimit 2626 + { "iso": [ 160, 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } }, - { // Quality B, + + { // Quality B "make_model": [ "Panasonic DMC-GX80", "Panasonic DMC-GX85", "Panasonic DMC-GX7MK2" ], - "dcraw_matrix": [ 7771,-3020,-629,-4029,11950,2345,-821,1977,6119 ],// DNG_v9.6 D65 + "dcraw_matrix": [ 7771,-3020,-629,-4029,11950,2345,-821,1977,6119 ], // DNG_v9.6 D65 "ranges": { - "black": 16, // 16 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 100, "levels": 2300 }, // gaussian 2300-2700 exif_linearitylimit 2111 - { "iso": 125, "levels": 3180 }, // gaussian 3200-3600 exif_linearitylimit 2626 - { "iso": [ 160, 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 16, // 16 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 100, "levels": 2300 }, // gaussian 2300-2700 Exif_linearitylimit 2111 + { "iso": 125, "levels": 3180 }, // gaussian 3200-3600 Exif_linearitylimit 2626 + { "iso": [ 160, 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } }, + { // Quality B, Same as Panasonic G7 "make_model": [ "Panasonic DMC-G8", "Panasonic DMC-G80", "Panasonic DMC-G81", "Panasonic DMC-G85" ], - "dcraw_matrix": [ 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 ],// DNG_v9.7 D65 + "dcraw_matrix": [ 7610,-2780,-576,-4614,12195,2733,-1375,2393,6490 ], // DNG_v9.7 D65 "ranges": { - "black": 16, // 16 is BL offset. Dcraw/RT read the base black from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 100, "levels": 2300 }, // gaussian 2300-2700 exif_linearitylimit 2111 - { "iso": 125, "levels": 3180 }, // gaussian 3200-3600 exif_linearitylimit 2626 - { "iso": [ 160, 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 16, // 16 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 100, "levels": 2300 }, // gaussian 2300-2700 Exif_linearitylimit 2111 + { "iso": 125, "levels": 3180 }, // gaussian 3200-3600 Exif_linearitylimit 2626 + { "iso": [ 160, 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } }, - { // Quality B, + + { // Quality B "make_model": "Panasonic DMC-GX8", "dcraw_matrix": [ 7564,-2263,-606,-3148,11239,2177,-540,1435,4853 ], // DNG_v9.1.1 D65 "ranges": { - "black": 15, // 16 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset - "white": [ - { "iso": 100, "levels": 2800 }, // gaussian 2900-3200 exif_linearitylimit 2111 - { "iso": 125, "levels": 3180 }, // guessed gaussian 3200-3600 exif_linearitylimit 2626 - { "iso": [ 160, 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 15, // 16 is BL offset. dcraw/RT read the base BL from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 100, "levels": 2800 }, // gaussian 2900-3200 Exif_linearitylimit 2111 + { "iso": 125, "levels": 3180 }, // guessed gaussian 3200-3600 Exif_linearitylimit 2626 + { "iso": [ 160, 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } }, - { // Quality B, uncertainty about ISO 100 WL + + { // Quality B, samples by Ingo, missing some long exposure at high ISO samples with LENR ON "make_model": [ "Panasonic DMC-LX100", "Leica D-LUX (Typ 109)" ], "dcraw_matrix": [ 8844,-3538,-768,-3709,11762,2200,-698,1792,5220 ], // DNG_V8.7 d65 - // "dcraw_matrix": [ 6538,-1614,-549,-5475,13096,2646,-1780,2799,5612 ], // calculated from DxO D50 + //"dcraw_matrix": [ 6538,-1614,-549,-5475,13096,2646,-1780,2799,5612 ], // calculated from DxO D50 "ranges": { - "black": 15, // 15 is BL offset. Dcraw/RT read the base BL from exif and calculates total BL = BLbase+BLoffset. - "white": [ - { "iso": 100, "levels": 2300 }, // gaussian 2400-2700 exif_linearitylimit 2111 - { "iso": [ 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 - ] - } + "black": 15, // 15 is BL offset. dcraw/RT read the base BL from Exif and calculates total BL = BLbase+BLoffset. + "white": [ + { "iso": 100, "levels": 2400 }, // gaussian R,B 2450-2700 G1,G2 2550-2800 Exif_linearitylimit 2111 + { "iso": 125, "levels": 3000 }, // gaussian R,B 3050-3350 G1,G2 3170-3480 Exif_linearitylimit 2626 + { "iso": 160, "levels": 3800 }, // gaussian R,B 3850-median 4020 G1,G2 3870-median 4050 Exif_linearitylimit 3277 + { "iso": [ 200, 250, 320, 400 ], "levels": 4080 }, // nominal 4095 + { "iso": [ 500, 640, 800, 1000, 1250, 1600 ], "levels": 4060 }, // nominal 4095 + { "iso": [ 2000, 2500 ], "levels": 4040 }, // nominal 4095 + { "iso": [ 3200, 4000, 5000 ], "levels": 3950 }, // nominal 4095 + { "iso": [ 6400, 8000, 10000 ], "levels": 4020 }, // nominal 4095 + { "iso": [ 12800, 16000, 20000, 25600 ], "levels": 4000 } // nominal 4095 + ] + } + }, + + { // Quality B, Intermediate ISOs missing + "make_model": [ "Panasonic DMC-LX9", "Panasonic DMC-LX10", "Panasonic DMC-LX15" ], + "dcraw_matrix": [ 7790,-2736,-755,-3452,11870,1769,-628,1647,4898 ], // DNg_v9.8 d65 + "raw_crop": [ 4, 4, -4, -4 ], // full raw frame 5488x3664 Exif crop 5472X3648 with 8pixel borders. Set the borders at 4 pixels which added with RT's 4 pixels border gives exactly the official frame. + "ranges": { + "black": 15, // 15 is BL offset. dcraw/RT read the base BL from Exif and calculates total BL = BLbase+BLoffset. + "white": [ + { "iso": 80, "levels": 2800 }, // gaussian 2800-3000 Exif_linearitylimit 2626 + { "iso": 100, "levels": 3500 }, // gaussian 3500-3700 Exif_linearitylimit 3277 + { "iso": [ 125, 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4060 } // nominal 4095 + ] + } }, { // Quality B, per ISO info missing @@ -1723,70 +1760,107 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "ranges": { "white": 4080 } // nominal at ISO200 4094 }, + { // Quality B, Intemediate ISO samples missing, Pentax_DNG WLtags are after BL sutraction and not valid + "make_model": [ "RICOH PENTAX K-70", "PENTAX K-70" ], + //"dcraw_matrix": [ 8050,-2061,-1264,-4359,12953,1515,-1096,1965,6075 ], // PENTAX DNG D65 + "dcraw_matrix": [ 8766,-3149,-747,-3976,11943,2292,-517,1259,5552 ], // Adobe DNGv9.8 D65 + "raw_crop": [ 58, 28, 6022, 4020 ], // full frame 6080x4064, usefull raw frame 56,28,6080,4049, official DNG raw_crop 58,28,6080,4052, official jpeg crop 58+8,28+4 6000x4000 + // "raw_crop": [ 62, 28, 6000, 4000 ], // matched to official jpeg crop 58+8,28+4 6000x4000 + "ranges": { + "white": [ + { "iso": 100, "levels": 16300 }, // 16319-16377 + { "iso": 200, "levels": 16250 }, // 16319-16315 + { "iso": 400, "levels": 16200 }, // 16255-16251 + { "iso": 800, "levels": 16050 }, // 16255-16120 + { "iso": 1600, "levels": 15750 }, // 15860 + { "iso": [ 3200, 6400 ], "levels": 16200 }, // 16350 + { "iso": [ 12800, 25600 ], "levels": 16100 }, // 16300 + { "iso": [ 51200, 102400 ], "levels": 16000 } // 16200 + ] + } + }, + + { // Quality B, Intemediate ISO samples missing, Pentax_DNG WLtags are after BL sutraction and not valid + "make_model": [ "RICOH PENTAX K-1", "PENTAX K-1" ], + "dcraw_matrix": [ 8596,-2981,-639,-4202,12046,2431,-685,1424,6122 ], // adobe DNG v9.7 D65 + //"dcraw_matrix": [ 8566,-2746,-1201,-3612,12204,1550,-893,1680,6264 ], // PENTAX DNG + "raw_crop": [ 6, 18, 7376, 4932 ], // full frame 7392x4950, cropped to official DNG raw_crop 6,18,7382,4950, official jpeg crop 8,10,7360x4912 + "ranges": { + "white": [ + { "iso": [ 100, 200, 400, 800 ], "levels": 16300 }, // 16380 + { "iso": [ 1600, 3200 ], "levels": 16250 }, // 16360 + { "iso": [ 6400, 12800 ], "levels": 16200 }, // 16330 + { "iso": [ 25600, 51200 ], "levels": 16100 }, // 16300 + { "iso": 102400, "levels": 16000 } // 16200 + ] + } + }, + { // Quality B, intermediate ISOs info missing "make_model": [ "RICOH PENTAX K-3", "PENTAX K-3" ], "dcraw_matrix": [ 7415,-2052,-721,-5186,12788,2682,-1446,2157,6773 ], // adobe dcp d65 -// "dcraw_matrix": [ 8542,-2581,-1144,-3995,12301,1881,863,1514,5755 ], // pentax DNG -// "dcraw_matrix": [ 6464,-1574,-422,-5324,12712,2934,-1129,1724,6900 ], // DxO + //"dcraw_matrix": [ 8542,-2581,-1144,-3995,12301,1881,863,1514,5755 ], // pentax DNG + //"dcraw_matrix": [ 6464,-1574,-422,-5324,12712,2934,-1129,1724,6900 ], // DxO "raw_crop": [ 10, 4, 6028, 4024 ], "ranges": { - "white": [ - { "iso": 100, "levels": 16310 }, // 16317 or 16350 - { "iso": 200, "levels": 16120 }, // 16254 or 16125 - { "iso": 400, "levels": 15860 }, // 16125 or 15868 - { "iso": 800, "levels": 15360 }, // 15868 or 15364-15370 - { "iso": [ 1600, 3200, 6400, 12800, 25600, 51200 ], "levels": 16300 } // 16383 - pentax dng tag is 15868-15350 - ] - } + "white": [ + { "iso": 100, "levels": 16310 }, // 16317 or 16350 + { "iso": 200, "levels": 16120 }, // 16254 or 16125 + { "iso": 400, "levels": 15860 }, // 16125 or 15868 + { "iso": 800, "levels": 15360 }, // 15868 or 15364-15370 + { "iso": [ 1600, 3200, 6400, 12800, 25600, 51200 ], "levels": 16300 } // 16383 - pentax dng tag is 15868-15350 + ] + } }, { // Quality B, intermediate ISOs info missing "make_model": [ "RICOH PENTAX 645Z", "PENTAX 645Z" ], "dcraw_matrix": [ 9519,-3591,-664,-4074,11725,2671,-624,1501,6653 ], // adobe dcp d65 - "raw_crop": [ 48, 0, 8276, 6208 ],// full sensor 8384x6208 - official jpeg 8256x6192 + "raw_crop": [ 48, 0, 8276, 6208 ], // full sensor 8384x6208 - official jpeg 8256x6192 "ranges": { - "white": [ - { "iso": 100, "levels": 16310 }, // 16317 or 16350 - { "iso": 200, "levels": 16120 }, // 16254 or 16125 - { "iso": 400, "levels": 15860 }, // 16125 or 15868 - { "iso": 800, "levels": 15360 }, // 15868 or 15364-15370 - { "iso": [ 1600, 3200, 6400, 12800, 25600, 51200 ], "levels": 16300 } // 16383 - pentax dng tag is 15868-15350 - ] - } + "white": [ + { "iso": 100, "levels": 16310 }, // 16317 or 16350 + { "iso": 200, "levels": 16120 }, // 16254 or 16125 + { "iso": 400, "levels": 15860 }, // 16125 or 15868 + { "iso": 800, "levels": 15360 }, // 15868 or 15364-15370 + { "iso": [ 1600, 3200, 6400, 12800, 25600, 51200 ], "levels": 16300 } // 16383 - pentax dng tag is 15868-15350 + ] + } }, { // Quality B, intermediate ISOs info missing, spread due to blackframe subtraction guessed to be around 10levels "make_model": "PENTAX K10D", "dcraw_matrix": [ 9566,-2863,-803,-7170,15172,2112,-818,803,9705 ], // adobe DNG d65 - // "raw_crop": [ 0, , 3888, 2608 ], + //"raw_crop": [ 0, , 3888, 2608 ], "ranges": { - "white": [ - { "iso": 100, "levels": 4080 }, // R,G1,B = 4095 G2= 4087 - { "iso": 200, "levels": 4080 }, // R,G1,B = 4093-94 G2= 4087or94 - { "iso": 400, "levels": 4080 }, // R,G1 = 4093-94, B=4094 G2= 4087or93or94 - { "iso": 800, "levels": 4070 }, // R,G1 = 4091-4093, B=4091-92 G2= 4078or82or84-86 - { "iso": [ 1600, 3200 ], "levels": 4060 } // 4067or4073-76 - ] - } + "white": [ + { "iso": 100, "levels": 4080 }, // R,G1,B = 4095 G2= 4087 + { "iso": 200, "levels": 4080 }, // R,G1,B = 4093-94 G2= 4087or94 + { "iso": 400, "levels": 4080 }, // R,G1 = 4093-94, B=4094 G2= 4087or93or94 + { "iso": 800, "levels": 4070 }, // R,G1 = 4091-4093, B=4091-92 G2= 4078or82or84-86 + { "iso": [ 1600, 3200 ], "levels": 4060 } // 4067or4073-76 + ] + } }, - { // Quality B, corrections for raw crop vs Dcraw9.21, matched to Samsung's default + { // Quality B, corrections for raw crop vs dcraw9.21, matched to Samsung's default "make_model": "Samsung NX mini", "dcraw_matrix": [ 5222,-1196,-550,-6540,14649,2009,-1666,2819,5657 ], // dng 8.6 d65 "raw_crop": [ 128, 36, 5480, 3656 ], // jpeg 5472x3648 - full raw: 5664 x 3710 - Samsung's official crop: 132, 40, 5604, 3688 "ranges": { "white": 4030 } // double clipping point for each channel at a) 4095 and b) bell distribution with peak at 4038 .. used the conservative one }, - { // Quality A, Conflict with "Samsung NX30" in Dcraw_v9.21_r1.414, frame corrections and color data + + { // Quality A, Conflict with "Samsung NX30" in dcraw_v9.21_r1.414, frame corrections and color data "make_model": [ "Samsung NX3000", "Samsung NX3300" ], "dcraw_matrix": [ 8060,-2933,-761,-4504,12890,1762,-630,1489,5227 ], // DNG_v8.7.1 D65 "raw_crop": [ 92, 38, 5480, 3656 ] // jpeg 5472x3648 - full raw: 5600 x 3714 - Samsung's official crop: 96, 42, 5568, 3690 - }, + }, { // Quality B, RT normally use the embedded data with DNGs but because various DNG use different color matrix adobe_coeff setting is used in dcraw.cc to always use the data from camconst.json for NX1 "make_model": [ "Samsung NX1", "Samsung NX500" ], "dcraw_matrix": [ 10686,-4042,-1052,-3595,13238,276,-464,1259,5931 ], // DNG_v8.7 D65 - // "dcraw_matrix": [ 13298,-6099,-296,-5243,16153,-1235,-508,1220,7758 ], // DNG_v8.7 Standard Light A - // "dcraw_matrix": [ 9598,-3268,-634,-5678,14795,824,-1255,2675,4523 ], // SAMSUNG DNG CONVERTER v1.0 + //"dcraw_matrix": [ 13298,-6099,-296,-5243,16153,-1235,-508,1220,7758 ], // DNG_v8.7 Standard Light A + //"dcraw_matrix": [ 9598,-3268,-634,-5678,14795,824,-1255,2675,4523 ], // SAMSUNG DNG CONVERTER v1.0 "ranges": { "white": [ { "iso": 100, "levels": 16000 }, // 16000 typical 16084, LE 16120 and 16383, LENR 16280 @@ -1796,47 +1870,51 @@ Quality X: unknown, ie we knowing to little about the camera properties to know } }, - { // Quality c, corrections for frame size, black and white levels not declared properly + { // Quality C, corrections for frame size, black and white levels not declared properly "make_model": "Sigma SD9", "dcraw_matrix": [ 14996,-3468,-1425,5576,3642,972,1761,3773,3720 ], // experimental calculated from sun0.icc data - "ranges": { "black": 0, "white": 16383 },// black is already subtracted by dcraw, white copied from x3dump data + "ranges": { "black": 0, "white": 16383 }, // black is already subtracted by dcraw, white copied from x3dump data "raw_crop": [ 20, 8, -18, -12 ] }, - { // Quality c, corrections for frame size, black level not declared properly + + { // Quality C, corrections for frame size, black level not declared properly "make_model": "Sigma SD10", "dcraw_matrix": [ 12555,-1865,-1125,5093,4120,867,1929,3810,3507 ], // experimental calculated from .icc data - "ranges": { "black": 0, "white": 16383 },// black is already subtracted by dcraw, white copied from x3dump data - // "raw_crop": [ 0, 0, -0, -0 ] + "ranges": { "black": 0, "white": 16383 }, // black is already subtracted by dcraw, white copied from x3dump data + //"raw_crop": [ 0, 0, -0, -0 ] "raw_crop": [ 20, 8, -18, -12 ] }, - { // Quality c, corrections for frame size, black and white levels not declared properly + + { // Quality C, corrections for frame size, black and white levels not declared properly "make_model": "Sigma SD14", "dcraw_matrix": [ 16411,-4764,-2383,8110,2603,-645,3135,3878,1984 ], // experimental inverted icc wp12 - build with BL=15 - // "dcraw_matrix": [ 13804,-4156,-1896,6917,1909,-431,2768,2989,1741 ], // experimental inverted icc wp10 - build with BL=15 - "ranges": { "black": 0, "white": 16383 },// peripheral black stripes give BL around 37 + //"dcraw_matrix": [ 13804,-4156,-1896,6917,1909,-431,2768,2989,1741 ], // experimental inverted icc wp10 - build with BL=15 + "ranges": { "black": 0, "white": 16383 }, // peripheral black stripes give BL around 37 "raw_crop": [ 0, 0, -0, -0 ] - // "raw_crop": [ 18, 12, 2652, 1768 ] + //"raw_crop": [ 18, 12, 2652, 1768 ] }, - { // Quality c, correction for frame width + { // Quality C, correction for frame width "make_model": "Sigma SD1", "dcraw_matrix": [ 5270,42,-814,3737,5506,124,1112,9714,4510 ], // experimental from icm 1.04477,-0.74838,1.01617, -0.54028,2.52690,-3.83257, 0.54869,-0.69556,3.73746 - "ranges": { "black": 16, "white": 4070 },// BL is 16 or 31, should be measured at the horizontal black stripe at the top + "ranges": { "black": 16, "white": 4070 }, // BL is 16 or 31, should be measured at the horizontal black stripe at the top "raw_crop": [ 12, 52, -110, -8 ] }, + { // Quality C, correction for frame width, color matrix investigated .. "make_model": "Sigma SD1 Merrill", "dcraw_matrix": [ 7211,-1577,-769,4996,3428,440,2717,7117,4699 ], // experimental inverted icc cloudy8140 d65 - // "dcraw_matrix": [ 5666,139,-892,3780,5428,270,1366,9757,4526 ], // experimental inverted icc sunny8161 - // "dcraw_matrix": [ 10288,-2449,-1718,8976,1868,-1608,7011,5039,-249 ], // experimental inverted icc tungsten8130 wp11 - // "dcraw_matrix": [ 5864,679,-1491,2963,7635,-919,-640,13738,2790 ], // experimental inverted icc sunny8160 - // "dcraw_matrix": [ 14032,-2231,-1016,-5263,14816,170,-112,183,9113 ], // hardcoded + //"dcraw_matrix": [ 5666,139,-892,3780,5428,270,1366,9757,4526 ], // experimental inverted icc sunny8161 + //"dcraw_matrix": [ 10288,-2449,-1718,8976,1868,-1608,7011,5039,-249 ], // experimental inverted icc tungsten8130 wp11 + //"dcraw_matrix": [ 5864,679,-1491,2963,7635,-919,-640,13738,2790 ], // experimental inverted icc sunny8160 + //"dcraw_matrix": [ 14032,-2231,-1016,-5263,14816,170,-112,183,9113 ], // hardcoded "ranges": { "black": 16, "white": 4070 }, // BL is 16 or 31, should be measured at the horizontal black stripe at the top "raw_crop": [ 12, 52, -110, -8 ] // for small size all numbers/2 }, + { // Quality C, correction for frame width, color matrix measured on a DP1 sample .. "make_model": [ "Sigma DP1 Merrill", "Sigma DP2 Merrill", "Sigma DP3 Merrill" ], - // "dcraw_matrix": [ 2149,1003,-530,-494,6073,344,-3935,10665,3608 ], // experimental, inverted icc DP1_Merrill_dpreview_daylight WP1.2 + //"dcraw_matrix": [ 2149,1003,-530,-494,6073,344,-3935,10665,3608 ], // experimental, inverted icc DP1_Merrill_dpreview_daylight WP1.2 "dcraw_matrix": [ 2517,1175,-621,-587,7080,404,-4677,12402,4231 ], // experimental, inverted icc DP1_Merrill_dpreview_daylight WP1.4 "ranges": { "black": 16, "white": 4070 }, // BL is 16 or 31, should be measured at the horizontal black stripe at the bottom "raw_crop": [ 12, 0, -110, -62 ] // for small size all numbers/2 @@ -1844,7 +1922,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { // Quality A, correction for color matrix from Colin Walker's d50 to dng d65 "make_model": "Sony NEX-C3", - // "dcraw_matrix": [ 5130,-1055,-269,-4473,11797,3050,-701,1310,7121 ], // Colin walker's d50 kept for possible consistency issues + //"dcraw_matrix": [ 5130,-1055,-269,-4473,11797,3050,-701,1310,7121 ], // Colin walker's d50 kept for possible consistency issues "dcraw_matrix": [ 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 ], "ranges": { "black": 512, "white": 16300 } }, @@ -1855,49 +1933,62 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "raw_crop": [ 0, 0, 4920, 3276 ], "ranges": { "black": 512, "white": 16300 } }, - { // Quality A, + + { // Quality A "make_model": "Sony ILCA-77M2", "dcraw_matrix": [ 5991,-1732,-443,-4100,11989,2381,-704,1467,5992 ], // adobe dcp d65 "raw_crop": [ 0, 0, 6024, 4024 ], "ranges": { "black": 512, "white": 16300 } }, - { // Quality B, + { // Quality B "make_model": "Sony ILCA-68", "dcraw_matrix": [ 6435,-1903,-536,-4722,12449,2550,-663,1363,6517 ], // adobe DNGv9.5 d65 "raw_crop": [ 0, 0, -30, 0 ], "ranges": { "black": 512, "white": 16300 } }, + { // Quality B, correction for frame width, crop modes covered + "make_model": "Sony ILCA-99M2", + "dcraw_matrix": [ 6660,-1918,-471,-4613,12398,2485,-649,1433,6447 ], // DNG_v9.8 D65 + "raw_crop": [ 0, 0, -36, 0 ], // full raw frame 8000x5320 - 36 rightmost columns are garbage + "ranges": { "black": 512, "white": 16300 } + }, + { // Quality A, correction for frame width "make_model": [ "Sony ILCE-3000", "Sony ILCE-3500", "Sony ILCE-5000", "Sony ILCE-QX1" ], "dcraw_matrix": [ 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 ], // adobe dcp d65 "ranges": { "black": 512, "white": 16300 }, "raw_crop": [ 0, 0, 5476, 3656 ] }, - { // Quality A, + + { // Quality A "make_model": "Sony ILCE-5100", "dcraw_matrix": [ 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 ], // adobe dcp d65 "raw_crop": [ 0, 0, 6024, 4024 ], "ranges": { "black": 512, "white": 16300 } }, + { // Quality A "make_model": "Sony ILCE-6000", "dcraw_matrix": [ 5991,-1456,-455,-4764,12135,2980,-707,1425,6701 ], // adobe dcp d65 "raw_crop": [ 0, 0, 6024, 4024 ], "ranges": { "black": 512, "white": 16300 } }, + { // Quality A - "make_model": "Sony ILCE-6300", - "dcraw_matrix": [ 5973,-1695,-419,-3826,11797,2293,-639,1398,5789 ], // DNG_v9.5 D65 + "make_model": [ "Sony ILCE-6300","Sony ILCE-6500" ], + "dcraw_matrix": [ 5973,-1695,-419,-3826,11797,2293,-639,1398,5789 ], // DNG_v9.8 D65 "raw_crop": [ 0, 0, 6024, 4024 ], "ranges": { "black": 512, "white": 16300 } }, + { // Quality A "make_model": "Sony ILCE-7M2", "dcraw_matrix": [ 5271,-712,-347,-6153,13653,2763,-1601,2366,7242 ], // DNGv8.7.1 "ranges": { "black": 512, "white": 16300 } }, + { // Quality A, correction for frame width "make_model": "Sony ILCE-7R", "dcraw_matrix": [ 4913,-541,-202,-6130,13513,2906,-1564,2151,7183 ], @@ -1918,106 +2009,138 @@ Quality X: unknown, ie we knowing to little about the camera properties to know "raw_crop": [ 0, 0, 4254, 2848 ], "ranges": { "black": 512, "white": 16300 } }, - { // Quality A, - "make_model": [ "Sony DSC-RX100M3", "Sony DSC-RX100M4" ], - "dcraw_matrix": [ 6596,-2079,-562,-4782,13016,1933,-970,1581,5181 ], // DNG_v9.1.1 D65 + + { // Quality A + "make_model": [ "Sony DSC-RX100M2", "Sony DSC-RX100M3", "Sony DSC-RX100M4", "Sony DSC-RX100M5" ], + "dcraw_matrix": [ 6596,-2079,-562,-4782,13016,1933,-970,1581,5181 ], // DNG_v9.8 D65 "ranges": { "black": 800, "white": 16300 } }, - { // Quality B, + + { // Quality B "make_model": [ "Sony DSC-RX10M2", "Sony DSC-RX10M3" ], "dcraw_matrix": [ 6679,-1825,-745,-5047,13256,1953,-1580,2422,5183 ], // DNG_v9.6 D65 "ranges": { "black": 800, "white": 16300 } }, - /* Phase One: color matrices borrowed from Adobe DNG Converter, black/white levels tested on actual raw files. - Note: the dcraw decoder makes black level subtraction and various corrections to the raw values based on - metadata embedded in the IIQ format, so what we see here is the result after that, ie black level is 0, - and white level is typically at or close to 65535. However sensors vary a bit and can be noisy around clip - so we cut away 0.05 stop from top down to 63300 to be a bit conservative. */ - { // quality A + { // Quality C, No proper color data, beta samples, frame set to official jpeg, + "make_model": "XIAOYI M1", + "dcraw_matrix": [ 7158,-1911,-606,-3603,10669,2530,-659,1236,5530 ], // XIAO YI DNG D65 + "raw_crop": [ 4, 3, 5192, 3896 ], // full raw 5200x3902, official jpeg 5184X3888 + "ranges": { + "white": [ + { "iso": 100, "levels": 4080 }, // typical 4092-4094 + { "iso": [ 200, 400, 800, 1600, 3200, 6400 ], "levels": 4080 }, // 4092-4095 + { "iso": [ 12800, 25600, 51200 ], "levels": 4080 } // 4090-4095 + ] + } + }, + +/* Phase One: color matrices borrowed from Adobe DNG Converter, black/white levels tested on actual raw files. + Note: the dcraw decoder makes black level subtraction and various corrections to the raw values based on + metadata embedded in the IIQ format, so what we see here is the result after that, ie black level is 0, + and white level is typically at or close to 65535. However sensors vary a bit and can be noisy around clip + so we cut away 0.05 stop from top down to 63300 to be a bit conservative. +*/ + + { // Quality A "make_model": [ "Phase One P40+", "Phase One IQ140", "Leaf Credo 40", "Phase One P65+", "Phase One IQ160", "Leaf Credo 60", "Phase One IQ260", "Phase One IQ3 60MP" ], "dcraw_matrix": [ 8035,435,-962,-6001,13872,2320,-1159,3065,5434 ], "ranges": { "black": 0, "white": 63300 } }, - { // quality A + + { // Quality A "make_model": [ "Phase One IQ180", "Leaf Credo 80", "Phase One IQ280", "Phase One IQ3 80MP" ], "dcraw_matrix": [ 6294,686,-712,-5435,13417,2211,-1006,2435,5042 ], "ranges": { "black": 0, "white": 63300 } }, - { // quality A + + { // Quality A "make_model": [ "Phase One P20", "Phase One P20+", "Phase One P25", "Phase One P25+" ], "dcraw_matrix": [ 2905,732,-237,-8135,16626,1476,-3038,4253,7517 ], "ranges": { "black": 0, "white": 63300 } }, - { // quality A + + { // Quality A "make_model": [ "Phase One P21", "Phase One P21+" ], "dcraw_matrix": [ 6516,-2050,-507,-8217,16703,1479,-3492,4741,8489 ], "ranges": { "black": 0, "white": 63300 } }, - { // quality A + + { // Quality A "make_model": [ "Phase One P30", "Phase One P30+"], "dcraw_matrix": [ 4516,-244,-36,-7020,14976,2174,-3206,4670,7087 ], "ranges": { "black": 0, "white": 63300 } }, - { // quality A + + { // Quality A "make_model": [ "Phase One P45", "Phase One P45+" ], "dcraw_matrix": [ 5053,-24,-117,-5685,14077,1703,-2619,4491,5850 ], "ranges": { "black": 0, "white": 63300 } }, - { // quality X, matrix taken from H5D-50c which has the same sensor, probably with the same CFA. Color looks good to the eye with files tested. + + { // Quality X, matrix taken from H5D-50c which has the same sensor, probably with the same CFA. Color looks good to the eye with files tested. "make_model": [ "Phase One IQ250", "Leaf Credo 50", "Phase One IQ3 50MP" ], - "dcraw_matrix": [ 4932, -835, 141, -4878, 11868, 3437, -1138, 1961, 7067 ], + "dcraw_matrix": [ 4932, -835, 141, -4878, 11868, 3437, -1138, 1961, 7067 ], "ranges": { "black": 0, "white": 64400 } // CMOS sensor, we dare to set white level a bit higher than for the more varying Phase One CCDs }, - { // quality C, matrix made from crappy cc24 photo + + { // Quality C, matrix made from crappy cc24 photo "make_model": [ "Phase One IQ3 100MP" ], "dcraw_matrix": [ 4479,-895,-536,-5818,13569,2742,-1186,2190,7909], "ranges": { "black": 0, "white": 64400 } }, + { // Quality A for tested CFV, the other models have the same sensor (16 megapixel square sensor) "make_model": [ "Hasselblad V96C", "Hasselblad CFV", "Hasselblad CFV-II" ], "dcraw_matrix": [ 8519, -3260, -280, -5081, 13459, 1738, -1449, 2960, 7809 ] // borrowed from Adobe's DNG converter }, + { // Quality A for tested CF-22, the other models have the same sensor "make_model": [ "Hasselblad CF-22", "Hasselblad CF-22MS", "Hasselblad CFH-22", "Hasselblad H3D-22", "Hasselblad H3DII-22" ], "dcraw_matrix": [ 8519, -3260, -280, -5081, 13459, 1738, -1449, 2960, 7809 ] // borrowed from Adobe's DNG converter }, + { // Quality A for tested H3D-31, the other models have the same sensor "make_model": [ "Hasselblad H3D-31", "Hasselblad H3DII-31", "Hasselblad H4D-31" ], "dcraw_matrix": [ 5458, -1448, 145, -4479, 12338, 2401, -1659, 3086, 6710 ] // borrowed from Adobe's DNG converter }, + { // Quality A for tested CFV-39, the other models have the same sensor. Small filter differences may exist so some might do better with a slightly different profile "make_model": [ "Hasselblad CF-39", "Hasselblad CF-39MS", "Hasselblad CFH-39", "Hasselblad CFV-39", "Hasselblad H3D-39", "Hasselblad H3DII-39", "Hasselblad H3DII-39MS" ], "dcraw_matrix": [ 3857, 452, -46, -6008, 14477, 1596, -2627, 4481, 5718 ] // borrowed from Adobe's DNG converter }, + { // Quality A for tested CFV-50, the other models have the same sensor "make_model": [ "Hasselblad CFV-50", "Hasselblad H3DII-50", "Hasselblad H3DII-50MS", "Hasselblad H4D-50", "Hasselblad H4D-50MS", "Hasselblad H4D-200MS", "Hasselblad H5D-50", "Hasselblad H5D-50MS", "Hasselblad H5D-200MS" ], - "dcraw_matrix": [ 5656, -659, -346, -3923, 12306, 1791, -1602, 3509, 5442 ] // borrowed from Adobe's DNG converter - }, - { // Quality A - "make_model": [ "Hasselblad H4D-40", "Hasselblad H5D-40" ], - "dcraw_matrix": [ 6159, -1402, -177, -5439, 12762, 3007, -955, 2200, 7104 ] // borrowed from Adobe's DNG converter - }, - { // Quality A for tested H4D-60, the other models have the same sensor - "make_model": [ "Hasselblad H4D-60", "Hasselblad H5D-60" ], - "dcraw_matrix": [ 9662, -684, -279, -4903, 12293, 2950, -344, 1669, 6024 ] // borrowed from Adobe's DNG converter - }, - { // Quality A - "make_model": [ "Hasselblad H5D-50c", "Hasselblad CFV-50c" ], - "dcraw_matrix": [ 4932, -835, 141, -4878, 11868, 3437, -1138, 1961, 7067 ] + "dcraw_matrix": [ 5656, -659, -346, -3923, 12306, 1791, -1602, 3509, 5442 ] // borrowed from Adobe's DNG converter }, - // dummy test entry to test the parser and show the format with all entries active + { // Quality A + "make_model": [ "Hasselblad H4D-40", "Hasselblad H5D-40" ], + "dcraw_matrix": [ 6159, -1402, -177, -5439, 12762, 3007, -955, 2200, 7104 ] // borrowed from Adobe's DNG converter + }, + + { // Quality A for tested H4D-60, the other models have the same sensor + "make_model": [ "Hasselblad H4D-60", "Hasselblad H5D-60" ], + "dcraw_matrix": [ 9662, -684, -279, -4903, 12293, 2950, -344, 1669, 6024 ] // borrowed from Adobe's DNG converter + }, + + { // Quality A + "make_model": [ "Hasselblad H5D-50c", "Hasselblad CFV-50c" ], + "dcraw_matrix": [ 4932, -835, 141, -4878, 11868, 3437, -1138, 1961, 7067 ] + }, + + // Dummy test entry to test the parser and show the format with all entries active { "make_model": "DummyMake DummyModel", "dcraw_matrix": [ 7530,-1942,-255,-4318,11390,3362,-926,1694,7649 ], - "raw_crop": [ 10, 20, 4000, 3000 ], - "masked_areas": [ 51, 2, 3804, 156, 51, 5794, 3804, 5792 ], + "raw_crop": [ 10, 20, 4000, 3000 ], + "masked_areas": [ 51, 2, 3804, 156, 51, 5794, 3804, 5792 ], "ranges": { - "aperture_scaling": [ - { "aperture": 1.2, "scale_factor": 1.1 }, - { "aperture": 1.4, "scale_factor": 1.08 } - ], + "aperture_scaling": [ + { "aperture": 1.2, "scale_factor": 1.1 }, + { "aperture": 1.4, "scale_factor": 1.08 } + ], "black": [ { "iso": 100 , "levels": [ 10, 20, 10, 20 ] }, { "iso": [100, 200] , "levels": [ 30, 40, 30 ] }, @@ -2027,7 +2150,7 @@ Quality X: unknown, ie we knowing to little about the camera properties to know { "iso": 100 , "levels": [ 10000, 11000, 10000, 11000 ] }, { "iso": 3200, "levels": [ 11000, 11000, 10000, 11000 ] } ], - "white_max": 16383 + "white_max": 16383 } } ]} diff --git a/rtengine/cfa_linedn_RT.cc b/rtengine/cfa_linedn_RT.cc index 78da79bb5..21fcfb1e5 100644 --- a/rtengine/cfa_linedn_RT.cc +++ b/rtengine/cfa_linedn_RT.cc @@ -68,11 +68,10 @@ void RawImageSource::CLASS cfa_linedn(float noise) { // allocate memory and assure the arrays don't have same 64 byte boundary to avoid L1 conflict misses - char *buffer = (char*)malloc(4 * TS * TS * sizeof(float) + 3 * 64); - float *cfain = (float*)(buffer); - float *cfablur = (float*)(buffer + (TS * TS * sizeof(float)) + 1 * 64); - float *cfadiff = (float*)(buffer + (2 * TS * TS * sizeof(float)) + 2 * 64); - float *cfadn = (float*)(buffer + (3 * TS * TS * sizeof(float)) + 3 * 64); + float *cfain = (float*)malloc(4 * TS * TS * sizeof(float) + 3 * 16 * sizeof(float)); + float *cfablur = (cfain + (TS * TS) + 1 * 16); + float *cfadiff = (cfain + (2 * TS * TS) + 2 * 16); + float *cfadn = (cfain + (3 * TS * TS) + 3 * 16); float linehvar[4], linevvar[4], noisefactor[4][8][2], coeffsq; @@ -250,7 +249,7 @@ void RawImageSource::CLASS cfa_linedn(float noise) } // clean up - free(buffer); + free(cfain); // copy temporary buffer back to image matrix #pragma omp for diff --git a/rtengine/cieimage.cc b/rtengine/cieimage.cc index 87954e1f0..be122febf 100644 --- a/rtengine/cieimage.cc +++ b/rtengine/cieimage.cc @@ -15,7 +15,7 @@ CieImage::CieImage (int w, int h) : fromImage(false), W(w), H(h) // Initialize the pointers to zero for (unsigned int c = 0; c < 6; ++c) { - data[c] = NULL; + data[c] = nullptr; } // Trying to allocate all in one block diff --git a/rtengine/cieimage.h b/rtengine/cieimage.h index a97622325..23b080ae3 100644 --- a/rtengine/cieimage.h +++ b/rtengine/cieimage.h @@ -20,11 +20,13 @@ #define _CIEIMAGE_H_ #include "image16.h" +#include "noncopyable.h" namespace rtengine { -class CieImage +class CieImage : + public NonCopyable { private: bool fromImage; diff --git a/rtengine/clutstore.h b/rtengine/clutstore.h index 7383b597f..5e4930fa1 100644 --- a/rtengine/clutstore.h +++ b/rtengine/clutstore.h @@ -7,16 +7,16 @@ #include "cache.h" #include "alignedbuffer.h" +#include "noncopyable.h" namespace rtengine { -class HaldCLUT +class HaldCLUT final : + public NonCopyable { public: HaldCLUT(); - HaldCLUT(const HaldCLUT& other) = delete; - HaldCLUT& operator =(const HaldCLUT& other) = delete; ~HaldCLUT(); bool load(const Glib::ustring& filename); @@ -51,14 +51,12 @@ private: Glib::ustring clut_profile; }; -class CLUTStore +class CLUTStore final : + public NonCopyable { public: static CLUTStore& getInstance(); - CLUTStore(const CLUTStore& other) = delete; - CLUTStore& operator =(const CLUTStore& other) = delete; - std::shared_ptr getClut(const Glib::ustring& filename); void clearCache(); diff --git a/rtengine/color.cc b/rtengine/color.cc index 58dc60320..5cf1d45b1 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -23,6 +23,7 @@ #include "mytime.h" #include "sleef.c" #include "opthelper.h" +#include "iccstore.h" #define pow_F(a,b) (xexpf(b*xlogf(a))) @@ -350,7 +351,7 @@ void Color::init () #ifdef _OPENMP #pragma omp section #endif - linearGammaTRC = cmsBuildGamma(NULL, 1.0); + linearGammaTRC = cmsBuildGamma(nullptr, 1.0); } } @@ -361,6 +362,153 @@ void Color::cleanup () } } +void Color::rgb2lab (Glib::ustring profile, Glib::ustring profileW, int r, int g, int b, float &LAB_l, float &LAB_a, float &LAB_b, bool workingSpace) +{ + double xyz_rgb[3][3]; + const double ep = 216.0 / 24389.0; + const double ka = 24389.0 / 27.0; + + double var_R = r / 65535.0; + double var_G = g / 65535.0; + double var_B = b / 65535.0; + + Glib::ustring profileCalc; + profileCalc = "sRGB"; //default + + if (workingSpace) { + profileCalc = profileW; //display working + } + + else {// if you want display = output space + if (profile == "RT_sRGB" || profile == "RT_sRGB_gBT709" || profile == "RT_sRGB_g10") { + profileCalc = "sRGB"; + } + + if (profile == "ProPhoto" || profile == "RT_Large_gBT709" || profile == "RT_Large_g10" || profile == "RT_Large_gsRGB") { + profileCalc = "ProPhoto"; + } + + if (profile == "AdobeRGB1998" || profile == "RT_Medium_gsRGB") { + profileCalc = "Adobe RGB"; + } + + if (profile == "WideGamutRGB") { + profileCalc = "WideGamut"; + } + } + + if (workingSpace) {//display working + if (profileW == "sRGB") { //apply sRGB inverse gamma + + if ( var_R > 0.04045 ) { + var_R = pow ( ( ( var_R + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); + } else { + var_R = var_R / 12.92; + } + + if ( var_G > 0.04045 ) { + var_G = pow ( ( ( var_G + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); + } else { + var_G = var_G / 12.92; + } + + if ( var_B > 0.04045 ) { + var_B = pow ( ( ( var_B + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); + } else { + var_B = var_B / 12.92; + } + } else if (profileW == "ProPhoto") { // apply inverse gamma 1.8 + var_R = pow ( var_R, 1.8); + var_G = pow ( var_G, 1.8); + var_B = pow ( var_B, 1.8); + } else { // apply inverse gamma 2.2 + var_R = pow ( var_R, 2.2); + var_G = pow ( var_G, 2.2); + var_B = pow ( var_B, 2.2); + } + } else { //display outout profile + + if (profile == "RT_sRGB" || profile == "RT_Large_gsRGB" || profile == "RT_Medium_gsRGB") { //apply sRGB inverse gamma + if ( var_R > 0.04045 ) { + var_R = pow ( ( ( var_R + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); + } else { + var_R = var_R / 12.92; + } + + if ( var_G > 0.04045 ) { + var_G = pow ( ( ( var_G + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); + } else { + var_G = var_G / 12.92; + } + + if ( var_B > 0.04045 ) { + var_B = pow ( ( ( var_B + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); + } else { + var_B = var_B / 12.92; + } + } + + else if (profile == "RT_sRGB_gBT709" || profile == "RT_Large_gBT709") { // + if ( var_R > 0.0795 ) { + var_R = pow ( ( ( var_R + 0.0954 ) / 1.0954 ), 2.2); + } else { + var_R = var_R / 4.5; + } + + if ( var_G > 0.0795 ) { + var_G = pow ( ( ( var_G + 0.0954 ) / 1.0954 ), 2.2); + } else { + var_G = var_G / 4.5; + } + + if ( var_B > 0.0795 ) { + var_B = pow ( ( ( var_B + 0.0954 ) / 1.0954 ), 2.2); + } else { + var_B = var_B / 4.5; + } + + } else if (profile == "ProPhoto") { // apply inverse gamma 1.8 + + var_R = pow ( var_R, 1.8); + var_G = pow ( var_G, 1.8); + var_B = pow ( var_B, 1.8); + } else if (profile == "RT_sRGB_g10" || profile == "RT_Large_g10") { // apply inverse gamma 1.8 + + var_R = pow ( var_R, 1.); + var_G = pow ( var_G, 1.); + var_B = pow ( var_B, 1.); + } + + else {// apply inverse gamma 2.2 + var_R = pow ( var_R, 2.2); + var_G = pow ( var_G, 2.2); + var_B = pow ( var_B, 2.2); + } + } + + // TMatrix wprof = rtengine::ICCStore::getInstance()->workingSpaceMatrix (profileW); + + TMatrix wprof = rtengine::ICCStore::getInstance()->workingSpaceMatrix (profileCalc); + + for (int m = 0; m < 3; m++) + for (int n = 0; n < 3; n++) { + xyz_rgb[m][n] = wprof[m][n]; + } + + double varxx, varyy, varzz; + double var_X = ( xyz_rgb[0][0] * var_R + xyz_rgb[0][1] * var_G + xyz_rgb[0][2] * var_B ) / Color::D50x; + double var_Y = ( xyz_rgb[1][0] * var_R + xyz_rgb[1][1] * var_G + xyz_rgb[1][2] * var_B ) ; + double var_Z = ( xyz_rgb[2][0] * var_R + xyz_rgb[2][1] * var_G + xyz_rgb[2][2] * var_B ) / Color::D50z; + + varxx = var_X > ep ? cbrt(var_X) : ( ka * var_X + 16.0) / 116.0 ; + varyy = var_Y > ep ? cbrt(var_Y) : ( ka * var_Y + 16.0) / 116.0 ; + varzz = var_Z > ep ? cbrt(var_Z) : ( ka * var_Z + 16.0) / 116.0 ; + LAB_l = ( 116 * varyy ) - 16; + LAB_a = 500 * ( varxx - varyy ); + LAB_b = 200 * ( varyy - varzz ); + +} + void Color::rgb2hsl(float r, float g, float b, float &h, float &s, float &l) { @@ -395,7 +543,7 @@ void Color::rgb2hsl(float r, float g, float b, float &h, float &s, float &l) h_ = 4. + (var_R - var_G) / C; } - h = float(h_ /= 6.0); + h = float(h_ / 6.0); if ( h < 0.f ) { h += 1.f; @@ -776,7 +924,7 @@ void Color::hsv2rgb (float h, float s, float v, int &r, int &g, int &b) r1 = t; g1 = p; b1 = v; - } else if (i == 5) { + } else /*if (i == 5)*/ { r1 = v; g1 = p; b1 = q; @@ -1500,7 +1648,7 @@ void Color::interpolateRGBColor (float realL, float iplow, float iphigh, int alg Color::xyz2rgb(X, Y, Z, ro, go, bo, rgb_xyz);// ro go bo in gamut } -void Color::calcGamma (double pwr, double ts, int mode, int imax, double &gamma0, double &gamma1, double &gamma2, double &gamma3, double &gamma4, double &gamma5) +void Color::calcGamma (double pwr, double ts, int mode, int imax, GammaValues &gamma) { //from Dcraw (D.Coffin) int i; @@ -1536,12 +1684,13 @@ void Color::calcGamma (double pwr, double ts, int mode, int imax, double &gamma0 } if (!mode--) { - gamma0 = g[0]; - gamma1 = g[1]; - gamma2 = g[2]; - gamma3 = g[3]; - gamma4 = g[4]; - gamma5 = g[5]; + gamma[0] = g[0]; + gamma[1] = g[1]; + gamma[2] = g[2]; + gamma[3] = g[3]; + gamma[4] = g[4]; + gamma[5] = g[5]; + gamma[6] = 0.; return; } } @@ -1849,7 +1998,6 @@ void Color::skinred ( double J, double h, double sres, double Sp, float dred, fl float factorskin, factorsat, factor, factorskinext, interm; float scale = 100.0f / 100.1f; //reduction in normal zone float scaleext = 1.0f; //reduction in transition zone - float protect_redh; float deltaHH = 0.3f; //HH value transition : I have choice 0.3 radians float HH; bool doskin = false; @@ -1930,7 +2078,6 @@ void Color::skinredfloat ( float J, float h, float sres, float Sp, float dred, f if(doskin) { float factorskin, factorsat, factor, factorskinext; - float protect_redh; float deltaHH = 0.3f; //HH value transition : I have choice 0.3 radians float chromapro = sres / Sp; @@ -2101,7 +2248,7 @@ void Color::AllMunsellLch(bool lumaMuns, float Lprov1, float Loldd, float HH, fl correctionHueLum = 0.0; - if(contin1 == true && contin2 == true) { + if(contin1 && contin2) { correctlum = correctlumprov2 - correctlumprov; } @@ -2491,7 +2638,7 @@ SSEFUNCTION void Color::LabGamutMunsell(float *labL, float *laba, float *labb, MyTime t1e, t2e; t1e.set(); int negat = 0, moreRGB = 0; - MunsellDebugInfo* MunsDebugInfo = NULL; + MunsellDebugInfo* MunsDebugInfo = nullptr; if (corMunsell) { MunsDebugInfo = new MunsellDebugInfo(); @@ -2610,8 +2757,8 @@ SSEFUNCTION void Color::LabGamutMunsell(float *labL, float *laba, float *labb, printf(" Gamut : G1negat=%iiter G165535=%iiter \n", negat, moreRGB); if (MunsDebugInfo) { - printf(" Munsell chrominance: MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad depass=%i\n", MunsDebugInfo->maxdhue[0], MunsDebugInfo->maxdhue[1], MunsDebugInfo->maxdhue[2], MunsDebugInfo->maxdhue[3], MunsDebugInfo->depass); - printf(" Munsell luminance : MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad depass=%i\n", MunsDebugInfo->maxdhuelum[0] , MunsDebugInfo->maxdhuelum[1], MunsDebugInfo->maxdhuelum[2], MunsDebugInfo->maxdhuelum[3], MunsDebugInfo->depassLum); + printf(" Munsell chrominance: MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad depass=%u\n", MunsDebugInfo->maxdhue[0], MunsDebugInfo->maxdhue[1], MunsDebugInfo->maxdhue[2], MunsDebugInfo->maxdhue[3], MunsDebugInfo->depass); + printf(" Munsell luminance : MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad depass=%u\n", MunsDebugInfo->maxdhuelum[0] , MunsDebugInfo->maxdhuelum[1], MunsDebugInfo->maxdhuelum[2], MunsDebugInfo->maxdhuelum[3], MunsDebugInfo->depassLum); } else { printf(" Munsell correction wasn't requested\n"); } diff --git a/rtengine/color.h b/rtengine/color.h index 350cd3b2a..77db1f4f7 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -17,20 +17,23 @@ * along with RawTherapee. If not, see . */ -#ifndef _COLOR_H_ -#define _COLOR_H_ +#pragma once + +#include #include "rt_math.h" #include "LUT.h" #include "labimage.h" -#include "iccstore.h" #include "iccmatrices.h" #include "sleef.c" + #define SAT(a,b,c) ((float)max(a,b,c)-(float)min(a,b,c))/(float)max(a,b,c) namespace rtengine { +typedef std::array GammaValues; + #ifdef _DEBUG class MunsellDebugInfo @@ -47,6 +50,7 @@ public: #endif + class Color { @@ -175,6 +179,22 @@ public: } + /** + * @brief Convert red/green/blue to L*a*b + * @brief Convert red/green/blue to hue/saturation/luminance + * @param profile output profile name + * @param profileW working profile name + * @param r red channel [0 ; 65535] + * @param g green channel [0 ; 65535] + * @param b blue channel [0 ; 65535] + * @param L Lab L channel [0 ; 1] (return value) + * @param a Lab a channel [0 ; 1] (return value) + * @param b Lab b channel [0; 1] (return value) + * @param workingSpace true: compute the Lab value using the Working color space ; false: use the Output color space + */ + static void rgb2lab (Glib::ustring profile, Glib::ustring profileW, int r, int g, int b, float &LAB_l, float &LAB_a, float &LAB_b, bool workingSpace); + + /** * @brief Convert red/green/blue to hue/saturation/luminance * @param r red channel [0 ; 65535] @@ -864,21 +884,21 @@ public: return h; } - /** * @brief Get the gamma curves' parameters used by LCMS2 * @param pwr gamma value [>1] * @param ts slope [0 ; 20] * @param mode [always 0] * @imax imax [always 0] - * @param gamma0 used in ip2Lab2rgb [0 ; 1], usually near 0.5 (return value) - * @param gamma1 used in ip2Lab2rgb [0 ; 20], can be superior to 20, but it's quite unusual(return value) - * @param gamma2 used in ip2Lab2rgb [0 ; 1], usually near 0.03(return value) - * @param gamma3 used in ip2Lab2rgb [0 ; 1], usually near 0.003(return value) - * @param gamma4 used in ip2Lab2rgb [0 ; 1], usually near 0.03(return value) - * @param gamma5 used in ip2Lab2rgb [0 ; 1], usually near 0.5 (return value) + * @param gamma a pointer to an array of 6 double gamma values: + * gamma0 used in ip2Lab2rgb [0 ; 1], usually near 0.5 (return value) + * gamma1 used in ip2Lab2rgb [0 ; 20], can be superior to 20, but it's quite unusual(return value) + * gamma2 used in ip2Lab2rgb [0 ; 1], usually near 0.03(return value) + * gamma3 used in ip2Lab2rgb [0 ; 1], usually near 0.003(return value) + * gamma4 used in ip2Lab2rgb [0 ; 1], usually near 0.03(return value) + * gamma5 used in ip2Lab2rgb [0 ; 1], usually near 0.5 (return value) */ - static void calcGamma (double pwr, double ts, int mode, int imax, double &gamma0, double &gamma1, double &gamma2, double &gamma3, double &gamma4, double &gamma5); + static void calcGamma (double pwr, double ts, int mode, int imax, GammaValues &gamma); /** @@ -1662,5 +1682,3 @@ public: }; } - -#endif diff --git a/rtengine/colortemp.cc b/rtengine/colortemp.cc index 1514357d8..5cf880b41 100644 --- a/rtengine/colortemp.cc +++ b/rtengine/colortemp.cc @@ -1025,7 +1025,7 @@ void ColorTemp::cieCAT02(double Xw, double Yw, double Zw, double &CAM02BB00, dou } -void ColorTemp::temp2mulxyz (double tem, double gree, std::string method , double &Xxyz, double &Zxyz) +void ColorTemp::temp2mulxyz (double tem, double gree, const std::string &method, double &Xxyz, double &Zxyz) { double xD, yD, x_D, y_D, interm; double x, y, z; @@ -1100,7 +1100,7 @@ void ColorTemp::temp2mulxyz (double tem, double gree, std::string method , doubl x_D = -4.6070e9 / (tem * tem * tem) + 2.9678e6 / (tem * tem) + 0.09911e3 / tem + 0.244063; } else if (tem <= 25000) { x_D = -2.0064e9 / (tem * tem * tem) + 1.9018e6 / (tem * tem) + 0.24748e3 / tem + 0.237040; - } else if (tem > 25000) { + } else /*if (tem > 25000)*/ { x_D = -2.0064e9 / (tem * tem * tem) + 1.9018e6 / (tem * tem) + 0.24748e3 / tem + 0.237040 - ((tem - 25000) / 25000) * 0.025; //Jacques empirical adjustemnt for very high temp (underwater !) } @@ -1135,12 +1135,10 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, //printf("temp=%d green=%.3f equal=%.3f\n", (int)temp, (float) green, (float) equal); //variables for CRI and display Lab, and palette - bool CRI_type = false; double xD, yD, x_D, y_D, interm; double m1, m2; - double xp, yp; - double x, y, z, xx, yy, zz; + double x, y, z; double Xchk[50], Ychk[50], Zchk[50]; //50 : I think it's a good limit for number of color : for CRI and Palette double Xcam02[50], Ycam02[50], Zcam02[50]; double Xcam02pal[50], Ycam02pal[50], Zcam02pal[50]; @@ -1148,16 +1146,12 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, double XchkLamp[50], YchkLamp[50], ZchkLamp[50]; double Xcam02Lamp[50], Ycam02Lamp[50], Zcam02Lamp[50]; double Xpal[50], Ypal[50], Zpal[50]; - double tempw; const double epsilon = 0.008856; //Lab const double whiteD50[3] = {0.9646019585, 1.0, 0.8244507152}; //calculate with this tool : spect 5nm double CAM02BB00, CAM02BB01, CAM02BB02, CAM02BB10, CAM02BB11, CAM02BB12, CAM02BB20, CAM02BB21, CAM02BB22; //for CIECAT02 double xr[50], yr[50], zr[50]; double fx[50], fy[50], fz[50]; - double Llamp[50], alamp[50], blamp[50]; - double Lbb[50], abb[50], bbb[50]; - double Lpal[50], apal[50], bpal[50]; int palet = -1; bool palette = false; @@ -1263,7 +1257,7 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, x_D = -4.6070e9 / (temp * temp * temp) + 2.9678e6 / (temp * temp) + 0.09911e3 / temp + 0.244063; } else if (temp <= 25000) { x_D = -2.0064e9 / (temp * temp * temp) + 1.9018e6 / (temp * temp) + 0.24748e3 / temp + 0.237040; - } else if (temp > 25000) { // above 25000 it's unknown..then I have modified to adjust for underwater + } else /*if (temp > 25000)*/ { // above 25000 it's unknown..then I have modified to adjust for underwater x_D = -2.0064e9 / (temp * temp * temp) + 1.9018e6 / (temp * temp) + 0.24748e3 / temp + 0.237040 - ((temp - 25000) / 25000) * 0.025; //Jacques empirical adjustemnt for very high temp (underwater !) } @@ -1291,8 +1285,6 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, double Xwb = xD / yD; double Ywb = 1.0; double Zwb = (1.0 - xD - yD) / yD; - double correl_temp; - if (settings->verbose) { // double u=4*xD/(-2*xD+12*yD+3); @@ -1335,11 +1327,6 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, { double x_x, y_y, z_z; // illuminants - const double* spect_illummax[] = { - Daylight5300_spect, Cloudy6200_spect, Shade7600_spect, A2856_spect, FluoF1_spect, FluoF2_spect, FluoF3_spect, FluoF4_spect, FluoF5_spect, FluoF6_spect, FluoF7_spect, - FluoF8_spect, FluoF9_spect, FluoF10_spect, FluoF11_spect, FluoF12_spect, HMI_spect, GTI_spect, JudgeIII_spect, Solux3500_spect, Solux4100_spect, Solux4700_spect, NG_Solux4700_spect, NG_CRSSP12WWMR16_spect, NG_CRSSP12WWMR16_spect, - Flash5500_spect, Flash6000_spect, Flash6500_spect - }; // color const double* spec_colorpalet[] = { ColabSkin98_m2_10_spect, ColabSkin95_0_4_spect, ColabSkin91_4_14_spect, ColabSkin90_m1_20_spect, @@ -1359,13 +1346,18 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, int N_col = sizeof(spec_colorpalet) / sizeof(spec_colorpalet[0]); //number of color if(palet < 28) { + const double* spect_illummax[] = { + Daylight5300_spect, Cloudy6200_spect, Shade7600_spect, A2856_spect, FluoF1_spect, FluoF2_spect, FluoF3_spect, FluoF4_spect, FluoF5_spect, FluoF6_spect, FluoF7_spect, + FluoF8_spect, FluoF9_spect, FluoF10_spect, FluoF11_spect, FluoF12_spect, HMI_spect, GTI_spect, JudgeIII_spect, Solux3500_spect, Solux4100_spect, Solux4700_spect, NG_Solux4700_spect, NG_CRSSP12WWMR16_spect, NG_CRSSP12WWMR16_spect, + Flash5500_spect, Flash6000_spect, Flash6500_spect + }; for(int i = 0; i < N_col; i++) { spectrum_to_color_xyz_preset(spec_colorpalet[i], spect_illummax[palet], x_x, y_y, z_z); Xpal[i] = x_x; Ypal[i] = y_y; Zpal[i] = z_z; } - } else if(palet >= 28) { + } else /*if(palet >= 28)*/ { if(temp < INITIALBLACKBODY) { for(int i = 0; i < N_col; i++) { spectrum_to_color_xyz_blackbody(spec_colorpalet[i], temp, x_x, y_y, z_z); @@ -1387,8 +1379,8 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, } } - xp = xD; - yp = yD; + double xp = xD; + double yp = yD; double Xwbpal = xp / yp; //white balance double Ywbpal = 1.0; double Zwbpal = (1.0 - xp - yp) / yp; @@ -1433,6 +1425,8 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, //Lab values in function of color and illuminant //these values can be compared to preview values when using white-balance (skin / sky / BW) + double Lpal[50], apal[50], bpal[50]; + for(int i = 0; i < N_col; i++) { Lpal[i] = 116.0 * fy[i] - 16.0; apal[i] = 500.0 * (fx[i] - fy[i]); @@ -1464,12 +1458,6 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, int numero_color = settings->CRI_color - 1; //spectral data illuminant (actually 21): only those necessary (lamp, fluorescent, LED) others CRI=100 (not Flash...) - const double* spect_illum[] = { - Daylight5300_spect, Cloudy6200_spect, Shade7600_spect, A2856_spect, FluoF1_spect, FluoF2_spect, FluoF3_spect, - FluoF4_spect, FluoF5_spect, FluoF6_spect, FluoF7_spect, FluoF8_spect, FluoF9_spect, FluoF10_spect, FluoF11_spect, - FluoF12_spect, HMI_spect, GTI_spect, JudgeIII_spect, Solux3500_spect, Solux4100_spect, Solux4700_spect, - NG_Solux4700_spect, NG_CRSSP12WWMR16_spect, NG_CRSSP12WWMR16_spect - }; const double* spec_color[] = { ColorchechredC3_spect, ColorchechOraA2_spect, ColorchechYelD3_spect, ColorchechGreE2_spect, ColorchechGreB3_spect, ColorchechCyaF3_spect, ColorchechPurD2_spect, ColorchechMagE3_spect, ColorchechSkiA138_13_14_spect, ColorchechGraC4_67_spect, @@ -1480,6 +1468,9 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, int N_c = sizeof(spec_color) / sizeof(spec_color[0]); //number of color + bool CRI_type = false; + double tempw; + if (method == "Fluo F1") { CRI_type = true; tempw = 6430; @@ -1569,25 +1560,26 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, } if (CRI_type) { + const double* spect_illum[] = { + Daylight5300_spect, Cloudy6200_spect, Shade7600_spect, A2856_spect, FluoF1_spect, FluoF2_spect, FluoF3_spect, + FluoF4_spect, FluoF5_spect, FluoF6_spect, FluoF7_spect, FluoF8_spect, FluoF9_spect, FluoF10_spect, FluoF11_spect, + FluoF12_spect, HMI_spect, GTI_spect, JudgeIII_spect, Solux3500_spect, Solux4100_spect, Solux4700_spect, + NG_Solux4700_spect, NG_CRSSP12WWMR16_spect, NG_CRSSP12WWMR16_spect + }; + float DeltaE[50], DeltaEs[8]; float quadCRI = 0.0f, quadCRIs = 0.0f; float CRI_RT = 0.0, CRI[50]; float CRI_RTs = 0.0, CRIs[8]; for(int i = 0; i < N_c; i++) { - spectrum_to_color_xyz_preset(spec_color[i], spect_illum[illum + 3], xx, yy, zz); - XchkLamp[i] = xx; - YchkLamp[i] = yy; - ZchkLamp[i] = zz; + spectrum_to_color_xyz_preset(spec_color[i], spect_illum[illum + 3], XchkLamp[i], YchkLamp[i], ZchkLamp[i]); } //calculate XYZ for each color : for Blackbody and Daylight at tempw if(tempw <= INITIALBLACKBODY) { for(int i = 0; i < N_c; i++) { - spectrum_to_color_xyz_blackbody(spec_color[i], tempw, xx, yy, zz); - Xchk[i] = xx; - Ychk[i] = yy; - Zchk[i] = zz; + spectrum_to_color_xyz_blackbody(spec_color[i], tempw, Xchk[i], Ychk[i], Zchk[i]); } spectrum_to_xyz_blackbody(tempw, x, y, z);//for white point @@ -1608,18 +1600,15 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, m22 = (0.03 - 31.4424 * x_DD + 30.0717 * y_DD) / interm2; for(int i = 0; i < N_c; i++) { - spectrum_to_color_xyz_daylight(spec_color[i], m11, m22, xx, yy, zz); - Xchk[i] = xx; - Ychk[i] = yy; - Zchk[i] = zz; + spectrum_to_color_xyz_daylight(spec_color[i], m11, m22, Xchk[i], Ychk[i], Zchk[i]); } spectrum_to_xyz_daylight(m11, m22, x, y, z); } - XYZtoCorColorTemp(Xwb, Ywb, Zwb, correl_temp); - if (settings->verbose) { + double correl_temp; + XYZtoCorColorTemp(Xwb, Ywb, Zwb, correl_temp); printf("Correlated temperature (lamp)=%i\n", (int) correl_temp); //use only for lamp...otherwise It give an information!! } @@ -1680,6 +1669,7 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, } } + double Llamp[50], alamp[50], blamp[50]; for(int i = 0; i < N_c; i++) { Llamp[i] = 116.0 * fy[i] - 16.0; alamp[i] = 500.0 * (fx[i] - fy[i]); @@ -1712,6 +1702,8 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, } } + double Lbb[50], abb[50], bbb[50]; + for(int i = 0; i < N_c; i++) { Lbb[i] = 116.*fy[i] - 16.; abb[i] = 500.*(fx[i] - fy[i]); diff --git a/rtengine/colortemp.h b/rtengine/colortemp.h index a1a805092..33a2b1b04 100644 --- a/rtengine/colortemp.h +++ b/rtengine/colortemp.h @@ -53,7 +53,7 @@ private: public: ColorTemp () : temp(-1.), green(-1.), equal (1.), method("Custom") {} - ColorTemp (double e) : temp(-1.), green(-1.), equal (e), method("Custom") {} + explicit ColorTemp (double e) : temp(-1.), green(-1.), equal (e), method("Custom") {} ColorTemp (double t, double g, double e, const Glib::ustring &m); ColorTemp (double mulr, double mulg, double mulb, double e); @@ -92,7 +92,7 @@ public: } void mul2temp (const double rmul, const double gmul, const double bmul, const double equal, double& temp, double& green) const; - static void temp2mulxyz (double tem, double gree, std::string method, double &Xxyz, double &Zxyz); + static void temp2mulxyz (double tem, double gree, const std::string &method, double &Xxyz, double &Zxyz); static void cieCAT02(double Xw, double Yw, double Zw, double &CAM02BB00, double &CAM02BB01, double &CAM02BB02, double &CAM02BB10, double &CAM02BB11, double &CAM02BB12, double &CAM02BB20, double &CAM02BB21, double &CAM02BB22, double adap ); //static void CAT02 (Imagefloat* baseImg, const ProcParams* params); diff --git a/rtengine/coord.h b/rtengine/coord.h index 2242cec1e..2f1325434 100644 --- a/rtengine/coord.h +++ b/rtengine/coord.h @@ -35,7 +35,7 @@ struct Coord Coord () = default; Coord (const int x, const int y); Coord (const Coord& other) = default; - Coord (const PolarCoord& other); + explicit Coord (const PolarCoord& other); Coord& operator= (const Coord& other) = default; Coord& operator= (const PolarCoord& other); @@ -48,7 +48,10 @@ struct Coord Coord& operator+= (const Coord& other); Coord& operator-= (const Coord& other); Coord& operator*= (const double scale); - + bool operator< (const Coord& rhs) const; + bool operator> (const Coord& rhs) const; + bool operator<=(const Coord& rhs) const; + bool operator>=(const Coord& rhs) const; }; bool operator== (const Coord& lhs, const Coord& rhs); @@ -66,7 +69,7 @@ struct PolarCoord PolarCoord () = default; PolarCoord (const double radius, const double angle); PolarCoord (const PolarCoord& other) = default; - PolarCoord (const Coord& other); + explicit PolarCoord (const Coord& other); PolarCoord& operator= (const PolarCoord& other) = default; PolarCoord& operator= (const Coord& other); @@ -130,6 +133,26 @@ inline Coord& Coord::operator*= (const double scale) return *this; } +inline bool Coord::operator< (const Coord& rhs) const +{ + return x < rhs.x && y < rhs.y; +} + +inline bool Coord::operator> (const Coord& rhs) const +{ + return x > rhs.x && y > rhs.y; +} + +inline bool Coord::operator<=(const Coord& rhs) const +{ + return x <= rhs.x && y <= rhs.y; +} + +inline bool Coord::operator>=(const Coord& rhs) const +{ + return x >= rhs.x && y >= rhs.y; +} + inline bool operator== (const Coord& lhs, const Coord& rhs) { return lhs.x == rhs.x && lhs.y == rhs.y; diff --git a/rtengine/cplx_wavelet_dec.cc b/rtengine/cplx_wavelet_dec.cc index d9e72e6c5..eafadaa54 100644 --- a/rtengine/cplx_wavelet_dec.cc +++ b/rtengine/cplx_wavelet_dec.cc @@ -26,7 +26,7 @@ namespace rtengine wavelet_decomposition::~wavelet_decomposition() { for(int i = 0; i <= lvltot; i++) { - if(wavelet_decomp[i] != NULL) { + if(wavelet_decomp[i] != nullptr) { delete wavelet_decomp[i]; } } diff --git a/rtengine/cplx_wavelet_dec.h b/rtengine/cplx_wavelet_dec.h index 0ab01be57..45e829322 100644 --- a/rtengine/cplx_wavelet_dec.h +++ b/rtengine/cplx_wavelet_dec.h @@ -22,15 +22,17 @@ #define CPLX_WAVELET_DEC_H_INCLUDED #include -#include +#include #include "cplx_wavelet_level.h" #include "cplx_wavelet_filter_coeffs.h" +#include "noncopyable.h" namespace rtengine { -class wavelet_decomposition +class wavelet_decomposition : + public NonCopyable { public: @@ -95,7 +97,7 @@ public: template wavelet_decomposition::wavelet_decomposition(E * src, int width, int height, int maxlvl, int subsampling, int skipcrop, int numThreads, int Daub4Len) - : coeff0(NULL), memoryAllocationFailed(false), lvltot(0), subsamp(subsampling), numThreads(numThreads), m_w(width), m_h(height) + : coeff0(nullptr), memoryAllocationFailed(false), lvltot(0), subsamp(subsampling), numThreads(numThreads), m_w(width), m_h(height) { //initialize wavelet filters @@ -153,17 +155,17 @@ wavelet_decomposition::wavelet_decomposition(E * src, int width, int height, int E *buffer[2]; buffer[0] = new (std::nothrow) E[(m_w / 2 + 1) * (m_h / 2 + 1)]; - if(buffer[0] == NULL) { + if(buffer[0] == nullptr) { memoryAllocationFailed = true; return; } buffer[1] = new (std::nothrow) E[(m_w / 2 + 1) * (m_h / 2 + 1)]; - if(buffer[1] == NULL) { + if(buffer[1] == nullptr) { memoryAllocationFailed = true; delete[] buffer[0]; - buffer[0] = NULL; + buffer[0] = nullptr; return; } @@ -208,7 +210,7 @@ void wavelet_decomposition::reconstruct(E * dst, const float blend) E *tmpHi = new (std::nothrow) E[width * height]; - if(tmpHi == NULL) { + if(tmpHi == nullptr) { memoryAllocationFailed = true; return; } @@ -217,7 +219,7 @@ void wavelet_decomposition::reconstruct(E * dst, const float blend) E *tmpLo = wavelet_decomp[lvl]->wavcoeffs[2]; // we can use this as buffer wavelet_decomp[lvl]->reconstruct_level(tmpLo, tmpHi, coeff0, coeff0, wavfilt_synth, wavfilt_synth, wavfilt_len, wavfilt_offset); delete wavelet_decomp[lvl]; - wavelet_decomp[lvl] = NULL; + wavelet_decomp[lvl] = nullptr; } delete[] tmpHi; @@ -232,7 +234,7 @@ void wavelet_decomposition::reconstruct(E * dst, const float blend) } else { // allocate new block of memory tmpLo = new (std::nothrow) E[width * height]; - if(tmpLo == NULL) { + if(tmpLo == nullptr) { memoryAllocationFailed = true; return; } @@ -240,7 +242,7 @@ void wavelet_decomposition::reconstruct(E * dst, const float blend) E *tmpHi = new (std::nothrow) E[width * height]; - if(tmpHi == NULL) { + if(tmpHi == nullptr) { memoryAllocationFailed = true; if(!wavelet_decomp[0]->bigBlockOfMemoryUsed()) { @@ -259,9 +261,9 @@ void wavelet_decomposition::reconstruct(E * dst, const float blend) delete[] tmpHi; delete wavelet_decomp[0]; - wavelet_decomp[0] = NULL; + wavelet_decomp[0] = nullptr; delete[] coeff0; - coeff0 = NULL; + coeff0 = nullptr; } }; diff --git a/rtengine/cplx_wavelet_level.h b/rtengine/cplx_wavelet_level.h index cbdb5a481..59c206f27 100644 --- a/rtengine/cplx_wavelet_level.h +++ b/rtengine/cplx_wavelet_level.h @@ -84,7 +84,7 @@ public: template wavelet_level(E * src, E * dst, int level, int subsamp, int w, int h, float *filterV, float *filterH, int len, int offset, int skipcrop, int numThreads) - : lvl(level), subsamp_out((subsamp >> level) & 1), numThreads(numThreads), skip(1 << level), bigBlockOfMemory(true), memoryAllocationFailed(false), wavcoeffs(NULL), m_w(w), m_h(h), m_w2(w), m_h2(h) + : lvl(level), subsamp_out((subsamp >> level) & 1), numThreads(numThreads), skip(1 << level), bigBlockOfMemory(true), memoryAllocationFailed(false), wavcoeffs(nullptr), m_w(w), m_h(h), m_w2(w), m_h2(h) { if (subsamp) { skip = 1; @@ -159,7 +159,7 @@ T ** wavelet_level::create(int n) { T * data = new (std::nothrow) T[3 * n]; - if(data == NULL) { + if(data == nullptr) { bigBlockOfMemory = false; } @@ -171,7 +171,7 @@ T ** wavelet_level::create(int n) } else { subbands[j] = new (std::nothrow) T[n]; - if(subbands[j] == NULL) { + if(subbands[j] == nullptr) { printf("Couldn't allocate memory in level %d of wavelet\n", lvl); memoryAllocationFailed = true; } @@ -189,7 +189,7 @@ void wavelet_level::destroy(T ** subbands) delete[] subbands[1]; } else { for(int j = 1; j < 4; j++) { - if(subbands[j] != NULL) { + if(subbands[j] != nullptr) { delete[] subbands[j]; } } diff --git a/rtengine/curves.cc b/rtengine/curves.cc index 9b68cc9ee..cf2fd0d04 100644 --- a/rtengine/curves.cc +++ b/rtengine/curves.cc @@ -36,6 +36,7 @@ #include "opthelper.h" #include "ciecam02.h" #include "color.h" +#include "iccstore.h" #undef CLIPD #define CLIPD(a) ((a)>0.0f?((a)<1.0f?(a):1.0f):0.0f) @@ -44,7 +45,7 @@ using namespace std; namespace rtengine { -Curve::Curve () : N(0), x(nullptr), y(nullptr), ypp(nullptr), hashSize(1000 /* has to be initialized to the maximum value */) {} +Curve::Curve () : N(0), ppn(0), x(nullptr), y(nullptr), mc(0.0), mfc(0.0), msc(0.0), mhc(0.0), ypp(nullptr), x1(0.0), y1(0.0), x2(0.0), y2(0.0), x3(0.0), y3(0.0), firstPointIncluded(false), increment(0.0), nbr_points(0), hashSize(1000 /* has to be initialized to the maximum value */) {} void Curve::AddPolygons () { @@ -1434,11 +1435,9 @@ void ColorGradientCurve::SetXYZ(const Curve *pCurve, const double xyz_rgb[3][3], double currY = pCurve->getVal(x) - prevY; if (dY > 0.000001 || dY < -0.000001) { - float r1, g1, b1, r2, g2, b2, ro, go, bo; + float r1, g1, b1, r2, g2, b2; Color::hsv2rgb(float(prevY), satur, lr1, r1, g1, b1); Color::hsv2rgb(float(nextY), satur, lr2, r2, g2, b2); - bool chr = false; - bool lum = true; LUTf dum; float X1, X2, Y1, Y2, Z1, Z2, L1, a_1, b_1, c1, h1; Color::rgbxyz(r2, g2, b2, X2, Y2, Z2, xyz_rgb); @@ -1775,7 +1774,7 @@ float PerceptualToneCurve::get_curve_val(float x, float range[2], float lut[], s } // calculate a single value that represents the contrast of the tone curve -float PerceptualToneCurve::calculateToneCurveContrastValue(void) const +float PerceptualToneCurve::calculateToneCurveContrastValue() const { // find linear y = k*x the best approximates the curve, which is the linear scaling/exposure component that does not contribute any contrast diff --git a/rtengine/dcp.h b/rtengine/dcp.h index 11e368b80..8b781ce6b 100644 --- a/rtengine/dcp.h +++ b/rtengine/dcp.h @@ -26,11 +26,12 @@ #include +#include "../rtgui/threadutils.h" + #include "imagefloat.h" #include "curves.h" #include "colortemp.h" - -#include "../rtgui/threadutils.h" +#include "noncopyable.h" namespace rtengine { @@ -63,7 +64,7 @@ public: using Triple = std::array; using Matrix = std::array; - DCPProfile(const Glib::ustring& filename); + explicit DCPProfile(const Glib::ustring& filename); ~DCPProfile(); explicit operator bool() const; @@ -145,14 +146,12 @@ private: AdobeToneCurve tone_curve; }; -class DCPStore final +class DCPStore final : + public NonCopyable { public: static DCPStore* getInstance(); - DCPStore(const DCPStore& other) = delete; - DCPStore& operator =(const DCPStore& other) = delete; - void init(const Glib::ustring& rt_profile_dir); bool isValidDCPFileName(const Glib::ustring& filename) const; diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 3593f2777..dcfe66ee5 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -4132,127 +4132,127 @@ mask_set: } } -void CLASS remove_zeroes() -{ - unsigned row, col, tot, n, r, c; - - for (row=0; row < height; row++) - for (col=0; col < width; col++) - if (BAYER(row,col) == 0) { - tot = n = 0; - for (r = row-2; r <= row+2; r++) - for (c = col-2; c <= col+2; c++) - if (r < height && c < width && - FC(r,c) == FC(row,col) && BAYER(r,c)) - tot += (n++,BAYER(r,c)); - if (n) BAYER(row,col) = tot/n; - } -} +//void CLASS remove_zeroes() +//{ +// unsigned row, col, tot, n, r, c; +// +// for (row=0; row < height; row++) +// for (col=0; col < width; col++) +// if (BAYER(row,col) == 0) { +// tot = n = 0; +// for (r = row-2; r <= row+2; r++) +// for (c = col-2; c <= col+2; c++) +// if (r < height && c < width && +// FC(r,c) == FC(row,col) && BAYER(r,c)) +// tot += (n++,BAYER(r,c)); +// if (n) BAYER(row,col) = tot/n; +// } +//} /* Seach from the current directory up to the root looking for a ".badpixels" file, and fix those pixels now. */ -void CLASS bad_pixels (const char *cfname) -{ - FILE *fp=0; - char *fname, *cp, line[128]; - int len, time, row, col, r, c, rad, tot, n, fixed=0; +//void CLASS bad_pixels (const char *cfname) +//{ +// FILE *fp=0; +// char *fname, *cp, line[128]; +// int len, time, row, col, r, c, rad, tot, n, fixed=0; +// +// if (!filters) return; +// if (cfname) +// fp = fopen (cfname, "r"); +// else { +// for (len=32 ; ; len *= 2) { +// fname = (char *) malloc (len); +// if (!fname) return; +// if (getcwd (fname, len-16)) break; +// free (fname); +// if (errno != ERANGE) return; +// } +//#if defined(WIN32) || defined(DJGPP) +// if (fname[1] == ':') +// memmove (fname, fname+2, len-2); +// for (cp=fname; *cp; cp++) +// if (*cp == '\\') *cp = '/'; +//#endif +// cp = fname + strlen(fname); +// if (cp[-1] == '/') cp--; +// while (*fname == '/') { +// strcpy (cp, "/.badpixels"); +// if ((fp = fopen (fname, "r"))) break; +// if (cp == fname) break; +// while (*--cp != '/'); +// } +// free (fname); +// } +// if (!fp) return; +// while (fgets (line, 128, fp)) { +// cp = strchr (line, '#'); +// if (cp) *cp = 0; +// if (sscanf (line, "%d %d %d", &col, &row, &time) != 3) continue; +// if ((unsigned) col >= width || (unsigned) row >= height) continue; +// if (time > timestamp) continue; +// for (tot=n=0, rad=1; rad < 3 && n==0; rad++) +// for (r = row-rad; r <= row+rad; r++) +// for (c = col-rad; c <= col+rad; c++) +// if ((unsigned) r < height && (unsigned) c < width && +// (r != row || c != col) && fcol(r,c) == fcol(row,col)) { +// tot += BAYER2(r,c); +// n++; +// } +// BAYER2(row,col) = tot/n; +// if (verbose) { +// if (!fixed++) +// fprintf (stderr,_("Fixed dead pixels at:")); +// fprintf (stderr, " %d,%d", col, row); +// } +// } +// if (fixed) fputc ('\n', stderr); +// fclose (fp); +//} - if (!filters) return; - if (cfname) - fp = fopen (cfname, "r"); - else { - for (len=32 ; ; len *= 2) { - fname = (char *) malloc (len); - if (!fname) return; - if (getcwd (fname, len-16)) break; - free (fname); - if (errno != ERANGE) return; - } -#if defined(WIN32) || defined(DJGPP) - if (fname[1] == ':') - memmove (fname, fname+2, len-2); - for (cp=fname; *cp; cp++) - if (*cp == '\\') *cp = '/'; -#endif - cp = fname + strlen(fname); - if (cp[-1] == '/') cp--; - while (*fname == '/') { - strcpy (cp, "/.badpixels"); - if ((fp = fopen (fname, "r"))) break; - if (cp == fname) break; - while (*--cp != '/'); - } - free (fname); - } - if (!fp) return; - while (fgets (line, 128, fp)) { - cp = strchr (line, '#'); - if (cp) *cp = 0; - if (sscanf (line, "%d %d %d", &col, &row, &time) != 3) continue; - if ((unsigned) col >= width || (unsigned) row >= height) continue; - if (time > timestamp) continue; - for (tot=n=0, rad=1; rad < 3 && n==0; rad++) - for (r = row-rad; r <= row+rad; r++) - for (c = col-rad; c <= col+rad; c++) - if ((unsigned) r < height && (unsigned) c < width && - (r != row || c != col) && fcol(r,c) == fcol(row,col)) { - tot += BAYER2(r,c); - n++; - } - BAYER2(row,col) = tot/n; - if (verbose) { - if (!fixed++) - fprintf (stderr,_("Fixed dead pixels at:")); - fprintf (stderr, " %d,%d", col, row); - } - } - if (fixed) fputc ('\n', stderr); - fclose (fp); -} - -void CLASS subtract (const char *fname) -{ - FILE *fp; - int dim[3]={0,0,0}, comment=0, number=0, error=0, nd=0, c, row, col; - ushort *pixel; - - if (!(fp = fopen (fname, "rb"))) { - perror (fname); return; - } - if (fgetc(fp) != 'P' || fgetc(fp) != '5') error = 1; - while (!error && nd < 3 && (c = fgetc(fp)) != EOF) { - if (c == '#') comment = 1; - if (c == '\n') comment = 0; - if (comment) continue; - if (isdigit(c)) number = 1; - if (number) { - if (isdigit(c)) dim[nd] = dim[nd]*10 + c -'0'; - else if (isspace(c)) { - number = 0; nd++; - } else error = 1; - } - } - if (error || nd < 3) { - fprintf (stderr,_("%s is not a valid PGM file!\n"), fname); - fclose (fp); return; - } else if (dim[0] != width || dim[1] != height || dim[2] != 65535) { - fprintf (stderr,_("%s has the wrong dimensions!\n"), fname); - fclose (fp); return; - } - pixel = (ushort *) calloc (width, sizeof *pixel); - merror (pixel, "subtract()"); - for (row=0; row < height; row++) { - fread (pixel, 2, width, fp); - for (col=0; col < width; col++) - BAYER(row,col) = MAX (BAYER(row,col) - ntohs(pixel[col]), 0); - } - free (pixel); - fclose (fp); - memset (cblack, 0, sizeof cblack); - black = 0; -} +//void CLASS subtract (const char *fname) +//{ +// FILE *fp; +// int dim[3]={0,0,0}, comment=0, number=0, error=0, nd=0, c, row, col; +// ushort *pixel; +// +// if (!(fp = fopen (fname, "rb"))) { +// perror (fname); return; +// } +// if (fgetc(fp) != 'P' || fgetc(fp) != '5') error = 1; +// while (!error && nd < 3 && (c = fgetc(fp)) != EOF) { +// if (c == '#') comment = 1; +// if (c == '\n') comment = 0; +// if (comment) continue; +// if (isdigit(c)) number = 1; +// if (number) { +// if (isdigit(c)) dim[nd] = dim[nd]*10 + c -'0'; +// else if (isspace(c)) { +// number = 0; nd++; +// } else error = 1; +// } +// } +// if (error || nd < 3) { +// fprintf (stderr,_("%s is not a valid PGM file!\n"), fname); +// fclose (fp); return; +// } else if (dim[0] != width || dim[1] != height || dim[2] != 65535) { +// fprintf (stderr,_("%s has the wrong dimensions!\n"), fname); +// fclose (fp); return; +// } +// pixel = (ushort *) calloc (width, sizeof *pixel); +// merror (pixel, "subtract()"); +// for (row=0; row < height; row++) { +// fread (pixel, 2, width, fp); +// for (col=0; col < width; col++) +// BAYER(row,col) = MAX (BAYER(row,col) - ntohs(pixel[col]), 0); +// } +// free (pixel); +// fclose (fp); +// memset (cblack, 0, sizeof cblack); +// black = 0; +//} void CLASS gamma_curve (double pwr, double ts, int mode, int imax) { @@ -4417,94 +4417,94 @@ void CLASS colorcheck() } #endif -void CLASS hat_transform (float *temp, float *base, int st, int size, int sc) -{ - int i; - for (i=0; i < sc; i++) - temp[i] = 2*base[st*i] + base[st*(sc-i)] + base[st*(i+sc)]; - for (; i+sc < size; i++) - temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(i+sc)]; - for (; i < size; i++) - temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(2*size-2-(i+sc))]; -} +//void CLASS hat_transform (float *temp, float *base, int st, int size, int sc) +//{ +// int i; +// for (i=0; i < sc; i++) +// temp[i] = 2*base[st*i] + base[st*(sc-i)] + base[st*(i+sc)]; +// for (; i+sc < size; i++) +// temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(i+sc)]; +// for (; i < size; i++) +// temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(2*size-2-(i+sc))]; +//} -void CLASS wavelet_denoise() -{ - float *fimg=0, *temp, thold, mul[2], avg, diff; - int scale=1, size, lev, hpass, lpass, row, col, nc, c, i, wlast, blk[2]; - ushort *window[4]; - static const float noise[] = - { 0.8002,0.2735,0.1202,0.0585,0.0291,0.0152,0.0080,0.0044 }; - - if (verbose) fprintf (stderr,_("Wavelet denoising...\n")); - - while (maximum << scale < 0x10000) scale++; - maximum <<= --scale; - black <<= scale; - FORC4 cblack[c] <<= scale; - if ((size = iheight*iwidth) < 0x15550000) - fimg = (float *) malloc ((size*3 + iheight + iwidth) * sizeof *fimg); - merror (fimg, "wavelet_denoise()"); - temp = fimg + size*3; - if ((nc = colors) == 3 && filters) nc++; - FORC(nc) { /* denoise R,G1,B,G3 individually */ - for (i=0; i < size; i++) - fimg[i] = 256 * sqrt(image[i][c] << scale); - for (hpass=lev=0; lev < 5; lev++) { - lpass = size*((lev & 1)+1); - for (row=0; row < iheight; row++) { - hat_transform (temp, fimg+hpass+row*iwidth, 1, iwidth, 1 << lev); - for (col=0; col < iwidth; col++) - fimg[lpass + row*iwidth + col] = temp[col] * 0.25; - } - for (col=0; col < iwidth; col++) { - hat_transform (temp, fimg+lpass+col, iwidth, iheight, 1 << lev); - for (row=0; row < iheight; row++) - fimg[lpass + row*iwidth + col] = temp[row] * 0.25; - } - thold = threshold * noise[lev]; - for (i=0; i < size; i++) { - fimg[hpass+i] -= fimg[lpass+i]; - if (fimg[hpass+i] < -thold) fimg[hpass+i] += thold; - else if (fimg[hpass+i] > thold) fimg[hpass+i] -= thold; - else fimg[hpass+i] = 0; - if (hpass) fimg[i] += fimg[hpass+i]; - } - hpass = lpass; - } - for (i=0; i < size; i++) - image[i][c] = CLIP(SQR(fimg[i]+fimg[lpass+i])/0x10000); - } - if (filters && colors == 3) { /* pull G1 and G3 closer together */ - for (row=0; row < 2; row++) { - mul[row] = 0.125 * pre_mul[FC(row+1,0) | 1] / pre_mul[FC(row,0) | 1]; - blk[row] = cblack[FC(row,0) | 1]; - } - for (i=0; i < 4; i++) - window[i] = (ushort *) fimg + width*i; - for (wlast=-1, row=1; row < height-1; row++) { - while (wlast < row+1) { - for (wlast++, i=0; i < 4; i++) - window[(i+3) & 3] = window[i]; - for (col = FC(wlast,1) & 1; col < width; col+=2) - window[2][col] = BAYER(wlast,col); - } - thold = threshold/512; - for (col = (FC(row,0) & 1)+1; col < width-1; col+=2) { - avg = ( window[0][col-1] + window[0][col+1] + - window[2][col-1] + window[2][col+1] - blk[~row & 1]*4 ) - * mul[row & 1] + (window[1][col] + blk[row & 1]) * 0.5; - avg = avg < 0 ? 0 : sqrt(avg); - diff = sqrt(BAYER(row,col)) - avg; - if (diff < -thold) diff += thold; - else if (diff > thold) diff -= thold; - else diff = 0; - BAYER(row,col) = CLIP(SQR(avg+diff) + 0.5); - } - } - } - free (fimg); -} +//void CLASS wavelet_denoise() +//{ +// float *fimg=0, *temp, thold, mul[2], avg, diff; +// int scale=1, size, lev, hpass, lpass, row, col, nc, c, i, wlast, blk[2]; +// ushort *window[4]; +// static const float noise[] = +// { 0.8002,0.2735,0.1202,0.0585,0.0291,0.0152,0.0080,0.0044 }; +// +// if (verbose) fprintf (stderr,_("Wavelet denoising...\n")); +// +// while (maximum << scale < 0x10000) scale++; +// maximum <<= --scale; +// black <<= scale; +// FORC4 cblack[c] <<= scale; +// if ((size = iheight*iwidth) < 0x15550000) +// fimg = (float *) malloc ((size*3 + iheight + iwidth) * sizeof *fimg); +// merror (fimg, "wavelet_denoise()"); +// temp = fimg + size*3; +// if ((nc = colors) == 3 && filters) nc++; +// FORC(nc) { /* denoise R,G1,B,G3 individually */ +// for (i=0; i < size; i++) +// fimg[i] = 256 * sqrt(image[i][c] << scale); +// for (hpass=lev=0; lev < 5; lev++) { +// lpass = size*((lev & 1)+1); +// for (row=0; row < iheight; row++) { +// hat_transform (temp, fimg+hpass+row*iwidth, 1, iwidth, 1 << lev); +// for (col=0; col < iwidth; col++) +// fimg[lpass + row*iwidth + col] = temp[col] * 0.25; +// } +// for (col=0; col < iwidth; col++) { +// hat_transform (temp, fimg+lpass+col, iwidth, iheight, 1 << lev); +// for (row=0; row < iheight; row++) +// fimg[lpass + row*iwidth + col] = temp[row] * 0.25; +// } +// thold = threshold * noise[lev]; +// for (i=0; i < size; i++) { +// fimg[hpass+i] -= fimg[lpass+i]; +// if (fimg[hpass+i] < -thold) fimg[hpass+i] += thold; +// else if (fimg[hpass+i] > thold) fimg[hpass+i] -= thold; +// else fimg[hpass+i] = 0; +// if (hpass) fimg[i] += fimg[hpass+i]; +// } +// hpass = lpass; +// } +// for (i=0; i < size; i++) +// image[i][c] = CLIP(SQR(fimg[i]+fimg[lpass+i])/0x10000); +// } +// if (filters && colors == 3) { /* pull G1 and G3 closer together */ +// for (row=0; row < 2; row++) { +// mul[row] = 0.125 * pre_mul[FC(row+1,0) | 1] / pre_mul[FC(row,0) | 1]; +// blk[row] = cblack[FC(row,0) | 1]; +// } +// for (i=0; i < 4; i++) +// window[i] = (ushort *) fimg + width*i; +// for (wlast=-1, row=1; row < height-1; row++) { +// while (wlast < row+1) { +// for (wlast++, i=0; i < 4; i++) +// window[(i+3) & 3] = window[i]; +// for (col = FC(wlast,1) & 1; col < width; col+=2) +// window[2][col] = BAYER(wlast,col); +// } +// thold = threshold/512; +// for (col = (FC(row,0) & 1)+1; col < width-1; col+=2) { +// avg = ( window[0][col-1] + window[0][col+1] + +// window[2][col-1] + window[2][col+1] - blk[~row & 1]*4 ) +// * mul[row & 1] + (window[1][col] + blk[row & 1]) * 0.5; +// avg = avg < 0 ? 0 : sqrt(avg); +// diff = sqrt(BAYER(row,col)) - avg; +// if (diff < -thold) diff += thold; +// else if (diff > thold) diff -= thold; +// else diff = 0; +// BAYER(row,col) = CLIP(SQR(avg+diff) + 0.5); +// } +// } +// } +// free (fimg); +//} void CLASS scale_colors() { @@ -4562,7 +4562,7 @@ skip_block: ; if (pre_mul[3] == 0) pre_mul[3] = colors < 4 ? pre_mul[1] : 1; dark = black; sat = maximum; - if (threshold) wavelet_denoise(); +// if (threshold) wavelet_denoise(); maximum -= black; for (dmin=DBL_MAX, dmax=c=0; c < 4; c++) { if (dmin > pre_mul[c]) @@ -4668,440 +4668,440 @@ void CLASS pre_interpolate() if (half_size) filters = 0; } -void CLASS border_interpolate (int border) -{ - unsigned row, col, y, x, f, c, sum[8]; - - for (row=0; row < height; row++) - for (col=0; col < width; col++) { - if (col==border && row >= border && row < height-border) - col = width-border; - memset (sum, 0, sizeof sum); - for (y=row-1; y != row+2; y++) - for (x=col-1; x != col+2; x++) - if (y < height && x < width) { - f = fcol(y,x); - sum[f] += image[y*width+x][f]; - sum[f+4]++; - } - f = fcol(row,col); - FORCC if (c != f && sum[c+4]) - image[row*width+col][c] = sum[c] / sum[c+4]; - } -} +//void CLASS border_interpolate (int border) +//{ +// unsigned row, col, y, x, f, c, sum[8]; +// +// for (row=0; row < height; row++) +// for (col=0; col < width; col++) { +// if (col==border && row >= border && row < height-border) +// col = width-border; +// memset (sum, 0, sizeof sum); +// for (y=row-1; y != row+2; y++) +// for (x=col-1; x != col+2; x++) +// if (y < height && x < width) { +// f = fcol(y,x); +// sum[f] += image[y*width+x][f]; +// sum[f+4]++; +// } +// f = fcol(row,col); +// FORCC if (c != f && sum[c+4]) +// image[row*width+col][c] = sum[c] / sum[c+4]; +// } +//} /* RT: delete interpolation functions */ -void CLASS cielab (ushort rgb[3], short lab[3]) -{ - int c, i, j, k; - float r, xyz[3]; - static float cbrt[0x10000], xyz_cam[3][4]; +//void CLASS cielab (ushort rgb[3], short lab[3]) +//{ +// int c, i, j, k; +// float r, xyz[3]; +// static float cbrt[0x10000], xyz_cam[3][4]; +// +// if (!rgb) { +// for (i=0; i < 0x10000; i++) { +// r = i / 65535.0; +// cbrt[i] = r > 0.008856 ? pow(r,1/3.0) : 7.787*r + 16/116.0; +// } +// for (i=0; i < 3; i++) +// for (j=0; j < colors; j++) +// for (xyz_cam[i][j] = k=0; k < 3; k++) +// xyz_cam[i][j] += xyz_rgb[i][k] * rgb_cam[k][j] / d65_white[i]; +// return; +// } +// xyz[0] = xyz[1] = xyz[2] = 0.5; +// FORCC { +// xyz[0] += xyz_cam[0][c] * rgb[c]; +// xyz[1] += xyz_cam[1][c] * rgb[c]; +// xyz[2] += xyz_cam[2][c] * rgb[c]; +// } +// xyz[0] = cbrt[CLIP((int) xyz[0])]; +// xyz[1] = cbrt[CLIP((int) xyz[1])]; +// xyz[2] = cbrt[CLIP((int) xyz[2])]; +// lab[0] = 64 * (116 * xyz[1] - 16); +// lab[1] = 64 * 500 * (xyz[0] - xyz[1]); +// lab[2] = 64 * 200 * (xyz[1] - xyz[2]); +//} +// +//#define TS 512 /* Tile Size */ +//#define fcol(row,col) xtrans[(row+6) % 6][(col+6) % 6] +// +///* +// Frank Markesteijn's algorithm for Fuji X-Trans sensors +// */ +//void CLASS xtrans_interpolate (int passes) +//{ +// int c, d, f, g, h, i, v, ng, row, col, top, left, mrow, mcol; +// int val, ndir, pass, hm[8], avg[4], color[3][8]; +// static const short orth[12] = { 1,0,0,1,-1,0,0,-1,1,0,0,1 }, +// patt[2][16] = { { 0,1,0,-1,2,0,-1,0,1,1,1,-1,0,0,0,0 }, +// { 0,1,0,-2,1,0,-2,0,1,1,-2,-2,1,-1,-1,1 } }, +// dir[4] = { 1,TS,TS+1,TS-1 }; +// short allhex[3][3][2][8], *hex; +// ushort min, max, sgrow, sgcol; +// ushort (*rgb)[TS][TS][3], (*rix)[3], (*pix)[4]; +// short (*lab) [TS][3], (*lix)[3]; +// float (*drv)[TS][TS], diff[6], tr; +// char (*homo)[TS][TS], *buffer; +// +// if (verbose) +// fprintf (stderr,_("%d-pass X-Trans interpolation...\n"), passes); +// +// cielab (0,0); +// ndir = 4 << (passes > 1); +// buffer = (char *) malloc (TS*TS*(ndir*11+6)); +// merror (buffer, "xtrans_interpolate()"); +// rgb = (ushort(*)[TS][TS][3]) buffer; +// lab = (short (*) [TS][3])(buffer + TS*TS*(ndir*6)); +// drv = (float (*)[TS][TS]) (buffer + TS*TS*(ndir*6+6)); +// homo = (char (*)[TS][TS]) (buffer + TS*TS*(ndir*10+6)); +// +///* Map a green hexagon around each non-green pixel and vice versa: */ +// for (row=0; row < 3; row++) +// for (col=0; col < 3; col++) +// for (ng=d=0; d < 10; d+=2) { +// g = fcol(row,col) == 1; +// if (fcol(row+orth[d],col+orth[d+2]) == 1) ng=0; else ng++; +// if (ng == 4) { sgrow = row; sgcol = col; } +// if (ng == g+1) FORC(8) { +// v = orth[d ]*patt[g][c*2] + orth[d+1]*patt[g][c*2+1]; +// h = orth[d+2]*patt[g][c*2] + orth[d+3]*patt[g][c*2+1]; +// allhex[row][col][0][c^(g*2 & d)] = h + v*width; +// allhex[row][col][1][c^(g*2 & d)] = h + v*TS; +// } +// } +// +///* Set green1 and green3 to the minimum and maximum allowed values: */ +// for (row=2; row < height-2; row++) +// for (min=~(max=0), col=2; col < width-2; col++) { +// if (fcol(row,col) == 1 && (min=~(max=0))) continue; +// pix = image + row*width + col; +// hex = allhex[row % 3][col % 3][0]; +// if (!max) FORC(6) { +// val = pix[hex[c]][1]; +// if (min > val) min = val; +// if (max < val) max = val; +// } +// pix[0][1] = min; +// pix[0][3] = max; +// switch ((row-sgrow) % 3) { +// case 1: if (row < height-3) { row++; col--; } break; +// case 2: if ((min=~(max=0)) && (col+=2) < width-3 && row > 2) row--; +// } +// } +// +// for (top=3; top < height-19; top += TS-16) +// for (left=3; left < width-19; left += TS-16) { +// mrow = MIN (top+TS, height-3); +// mcol = MIN (left+TS, width-3); +// for (row=top; row < mrow; row++) +// for (col=left; col < mcol; col++) +// memcpy (rgb[0][row-top][col-left], image[row*width+col], 6); +// FORC3 memcpy (rgb[c+1], rgb[0], sizeof *rgb); +// +///* Interpolate green horizontally, vertically, and along both diagonals: */ +// for (row=top; row < mrow; row++) +// for (col=left; col < mcol; col++) { +// if ((f = fcol(row,col)) == 1) continue; +// pix = image + row*width + col; +// hex = allhex[row % 3][col % 3][0]; +// color[1][0] = 174 * (pix[ hex[1]][1] + pix[ hex[0]][1]) - +// 46 * (pix[2*hex[1]][1] + pix[2*hex[0]][1]); +// color[1][1] = 223 * pix[ hex[3]][1] + pix[ hex[2]][1] * 33 + +// 92 * (pix[ 0 ][f] - pix[ -hex[2]][f]); +// FORC(2) color[1][2+c] = +// 164 * pix[hex[4+c]][1] + 92 * pix[-2*hex[4+c]][1] + 33 * +// (2*pix[0][f] - pix[3*hex[4+c]][f] - pix[-3*hex[4+c]][f]); +// FORC4 rgb[c^!((row-sgrow) % 3)][row-top][col-left][1] = +// LIM(color[1][c] >> 8,pix[0][1],pix[0][3]); +// } +// +// for (pass=0; pass < passes; pass++) { +// if (pass == 1) +// memcpy (rgb+=4, buffer, 4*sizeof *rgb); +// +///* Recalculate green from interpolated values of closer pixels: */ +// if (pass) { +// for (row=top+2; row < mrow-2; row++) +// for (col=left+2; col < mcol-2; col++) { +// if ((f = fcol(row,col)) == 1) continue; +// pix = image + row*width + col; +// hex = allhex[row % 3][col % 3][1]; +// for (d=3; d < 6; d++) { +// rix = &rgb[(d-2)^!((row-sgrow) % 3)][row-top][col-left]; +// val = rix[-2*hex[d]][1] + 2*rix[hex[d]][1] +// - rix[-2*hex[d]][f] - 2*rix[hex[d]][f] + 3*rix[0][f]; +// rix[0][1] = LIM(val/3,pix[0][1],pix[0][3]); +// } +// } +// } +// +///* Interpolate red and blue values for solitary green pixels: */ +// for (row=(top-sgrow+4)/3*3+sgrow; row < mrow-2; row+=3) +// for (col=(left-sgcol+4)/3*3+sgcol; col < mcol-2; col+=3) { +// rix = &rgb[0][row-top][col-left]; +// h = fcol(row,col+1); +// memset (diff, 0, sizeof diff); +// for (i=1, d=0; d < 6; d++, i^=TS^1, h^=2) { +// for (c=0; c < 2; c++, h^=2) { +// g = 2*rix[0][1] - rix[i< 1) +// diff[d] += SQR (rix[i< 1 && (d & 1)) +// if (diff[d-1] < diff[d]) +// FORC(2) color[c*2][d] = color[c*2][d-1]; +// if (d < 2 || (d & 1)) { +// FORC(2) rix[0][c*2] = CLIP(color[c*2][d]/2); +// rix += TS*TS; +// } +// } +// } +// +///* Interpolate red for blue pixels and vice versa: */ +// for (row=top+3; row < mrow-3; row++) +// for (col=left+3; col < mcol-3; col++) { +// if ((f = 2-fcol(row,col)) == 1) continue; +// rix = &rgb[0][row-top][col-left]; +// c = (row-sgrow) % 3 ? TS:1; +// h = 3 * (c ^ TS ^ 1); +// for (d=0; d < 4; d++, rix += TS*TS) { +// i = d > 1 || ((d ^ c) & 1) || +// ((ABS(rix[0][1]-rix[c][1])+ABS(rix[0][1]-rix[-c][1])) < +// 2*(ABS(rix[0][1]-rix[h][1])+ABS(rix[0][1]-rix[-h][1]))) ? c:h; +// rix[0][f] = CLIP((rix[i][f] + rix[-i][f] + +// 2*rix[0][1] - rix[i][1] - rix[-i][1])/2); +// } +// } +// +///* Fill in red and blue for 2x2 blocks of green: */ +// for (row=top+2; row < mrow-2; row++) if ((row-sgrow) % 3) +// for (col=left+2; col < mcol-2; col++) if ((col-sgcol) % 3) { +// rix = &rgb[0][row-top][col-left]; +// hex = allhex[row % 3][col % 3][1]; +// for (d=0; d < ndir; d+=2, rix += TS*TS) +// if (hex[d] + hex[d+1]) { +// g = 3*rix[0][1] - 2*rix[hex[d]][1] - rix[hex[d+1]][1]; +// for (c=0; c < 4; c+=2) rix[0][c] = +// CLIP((g + 2*rix[hex[d]][c] + rix[hex[d+1]][c])/3); +// } else { +// g = 2*rix[0][1] - rix[hex[d]][1] - rix[hex[d+1]][1]; +// for (c=0; c < 4; c+=2) rix[0][c] = +// CLIP((g + rix[hex[d]][c] + rix[hex[d+1]][c])/2); +// } +// } +// } +// rgb = (ushort(*)[TS][TS][3]) buffer; +// mrow -= top; +// mcol -= left; +// +///* Convert to CIELab and differentiate in all directions: */ +// for (d=0; d < ndir; d++) { +// for (row=2; row < mrow-2; row++) +// for (col=2; col < mcol-2; col++) +// cielab (rgb[d][row][col], lab[row][col]); +// for (f=dir[d & 3],row=3; row < mrow-3; row++) +// for (col=3; col < mcol-3; col++) { +// lix = &lab[row][col]; +// g = 2*lix[0][0] - lix[f][0] - lix[-f][0]; +// drv[d][row][col] = SQR(g) +// + SQR((2*lix[0][1] - lix[f][1] - lix[-f][1] + g*500/232)) +// + SQR((2*lix[0][2] - lix[f][2] - lix[-f][2] - g*500/580)); +// } +// } +// +///* Build homogeneity maps from the derivatives: */ +// memset(homo, 0, ndir*TS*TS); +// for (row=4; row < mrow-4; row++) +// for (col=4; col < mcol-4; col++) { +// for (tr=FLT_MAX, d=0; d < ndir; d++) +// if (tr > drv[d][row][col]) +// tr = drv[d][row][col]; +// tr *= 8; +// for (d=0; d < ndir; d++) +// for (v=-1; v <= 1; v++) +// for (h=-1; h <= 1; h++) +// if (drv[d][row+v][col+h] <= tr) +// homo[d][row][col]++; +// } +// +///* Average the most homogenous pixels for the final result: */ +// if (height-top < TS+4) mrow = height-top+2; +// if (width-left < TS+4) mcol = width-left+2; +// for (row = MIN(top,8); row < mrow-8; row++) +// for (col = MIN(left,8); col < mcol-8; col++) { +// for (d=0; d < ndir; d++) +// for (hm[d]=0, v=-2; v <= 2; v++) +// for (h=-2; h <= 2; h++) +// hm[d] += homo[d][row+v][col+h]; +// for (d=0; d < ndir-4; d++) +// if (hm[d] < hm[d+4]) hm[d ] = 0; else +// if (hm[d] > hm[d+4]) hm[d+4] = 0; +// for (max=hm[0],d=1; d < ndir; d++) +// if (max < hm[d]) max = hm[d]; +// max -= max >> 3; +// memset (avg, 0, sizeof avg); +// for (d=0; d < ndir; d++) +// if (hm[d] >= max) { +// FORC3 avg[c] += rgb[d][row][col][c]; +// avg[3]++; +// } +// FORC3 image[(row+top)*width+col+left][c] = avg[c]/avg[3]; +// } +// } +// free(buffer); +// border_interpolate(8); +//} +//#undef fcol +// +// +//#undef TS - if (!rgb) { - for (i=0; i < 0x10000; i++) { - r = i / 65535.0; - cbrt[i] = r > 0.008856 ? pow(r,1/3.0) : 7.787*r + 16/116.0; - } - for (i=0; i < 3; i++) - for (j=0; j < colors; j++) - for (xyz_cam[i][j] = k=0; k < 3; k++) - xyz_cam[i][j] += xyz_rgb[i][k] * rgb_cam[k][j] / d65_white[i]; - return; - } - xyz[0] = xyz[1] = xyz[2] = 0.5; - FORCC { - xyz[0] += xyz_cam[0][c] * rgb[c]; - xyz[1] += xyz_cam[1][c] * rgb[c]; - xyz[2] += xyz_cam[2][c] * rgb[c]; - } - xyz[0] = cbrt[CLIP((int) xyz[0])]; - xyz[1] = cbrt[CLIP((int) xyz[1])]; - xyz[2] = cbrt[CLIP((int) xyz[2])]; - lab[0] = 64 * (116 * xyz[1] - 16); - lab[1] = 64 * 500 * (xyz[0] - xyz[1]); - lab[2] = 64 * 200 * (xyz[1] - xyz[2]); -} - -#define TS 512 /* Tile Size */ -#define fcol(row,col) xtrans[(row+6) % 6][(col+6) % 6] - -/* - Frank Markesteijn's algorithm for Fuji X-Trans sensors - */ -void CLASS xtrans_interpolate (int passes) -{ - int c, d, f, g, h, i, v, ng, row, col, top, left, mrow, mcol; - int val, ndir, pass, hm[8], avg[4], color[3][8]; - static const short orth[12] = { 1,0,0,1,-1,0,0,-1,1,0,0,1 }, - patt[2][16] = { { 0,1,0,-1,2,0,-1,0,1,1,1,-1,0,0,0,0 }, - { 0,1,0,-2,1,0,-2,0,1,1,-2,-2,1,-1,-1,1 } }, - dir[4] = { 1,TS,TS+1,TS-1 }; - short allhex[3][3][2][8], *hex; - ushort min, max, sgrow, sgcol; - ushort (*rgb)[TS][TS][3], (*rix)[3], (*pix)[4]; - short (*lab) [TS][3], (*lix)[3]; - float (*drv)[TS][TS], diff[6], tr; - char (*homo)[TS][TS], *buffer; - - if (verbose) - fprintf (stderr,_("%d-pass X-Trans interpolation...\n"), passes); - - cielab (0,0); - ndir = 4 << (passes > 1); - buffer = (char *) malloc (TS*TS*(ndir*11+6)); - merror (buffer, "xtrans_interpolate()"); - rgb = (ushort(*)[TS][TS][3]) buffer; - lab = (short (*) [TS][3])(buffer + TS*TS*(ndir*6)); - drv = (float (*)[TS][TS]) (buffer + TS*TS*(ndir*6+6)); - homo = (char (*)[TS][TS]) (buffer + TS*TS*(ndir*10+6)); - -/* Map a green hexagon around each non-green pixel and vice versa: */ - for (row=0; row < 3; row++) - for (col=0; col < 3; col++) - for (ng=d=0; d < 10; d+=2) { - g = fcol(row,col) == 1; - if (fcol(row+orth[d],col+orth[d+2]) == 1) ng=0; else ng++; - if (ng == 4) { sgrow = row; sgcol = col; } - if (ng == g+1) FORC(8) { - v = orth[d ]*patt[g][c*2] + orth[d+1]*patt[g][c*2+1]; - h = orth[d+2]*patt[g][c*2] + orth[d+3]*patt[g][c*2+1]; - allhex[row][col][0][c^(g*2 & d)] = h + v*width; - allhex[row][col][1][c^(g*2 & d)] = h + v*TS; - } - } - -/* Set green1 and green3 to the minimum and maximum allowed values: */ - for (row=2; row < height-2; row++) - for (min=~(max=0), col=2; col < width-2; col++) { - if (fcol(row,col) == 1 && (min=~(max=0))) continue; - pix = image + row*width + col; - hex = allhex[row % 3][col % 3][0]; - if (!max) FORC(6) { - val = pix[hex[c]][1]; - if (min > val) min = val; - if (max < val) max = val; - } - pix[0][1] = min; - pix[0][3] = max; - switch ((row-sgrow) % 3) { - case 1: if (row < height-3) { row++; col--; } break; - case 2: if ((min=~(max=0)) && (col+=2) < width-3 && row > 2) row--; - } - } - - for (top=3; top < height-19; top += TS-16) - for (left=3; left < width-19; left += TS-16) { - mrow = MIN (top+TS, height-3); - mcol = MIN (left+TS, width-3); - for (row=top; row < mrow; row++) - for (col=left; col < mcol; col++) - memcpy (rgb[0][row-top][col-left], image[row*width+col], 6); - FORC3 memcpy (rgb[c+1], rgb[0], sizeof *rgb); - -/* Interpolate green horizontally, vertically, and along both diagonals: */ - for (row=top; row < mrow; row++) - for (col=left; col < mcol; col++) { - if ((f = fcol(row,col)) == 1) continue; - pix = image + row*width + col; - hex = allhex[row % 3][col % 3][0]; - color[1][0] = 174 * (pix[ hex[1]][1] + pix[ hex[0]][1]) - - 46 * (pix[2*hex[1]][1] + pix[2*hex[0]][1]); - color[1][1] = 223 * pix[ hex[3]][1] + pix[ hex[2]][1] * 33 + - 92 * (pix[ 0 ][f] - pix[ -hex[2]][f]); - FORC(2) color[1][2+c] = - 164 * pix[hex[4+c]][1] + 92 * pix[-2*hex[4+c]][1] + 33 * - (2*pix[0][f] - pix[3*hex[4+c]][f] - pix[-3*hex[4+c]][f]); - FORC4 rgb[c^!((row-sgrow) % 3)][row-top][col-left][1] = - LIM(color[1][c] >> 8,pix[0][1],pix[0][3]); - } - - for (pass=0; pass < passes; pass++) { - if (pass == 1) - memcpy (rgb+=4, buffer, 4*sizeof *rgb); - -/* Recalculate green from interpolated values of closer pixels: */ - if (pass) { - for (row=top+2; row < mrow-2; row++) - for (col=left+2; col < mcol-2; col++) { - if ((f = fcol(row,col)) == 1) continue; - pix = image + row*width + col; - hex = allhex[row % 3][col % 3][1]; - for (d=3; d < 6; d++) { - rix = &rgb[(d-2)^!((row-sgrow) % 3)][row-top][col-left]; - val = rix[-2*hex[d]][1] + 2*rix[hex[d]][1] - - rix[-2*hex[d]][f] - 2*rix[hex[d]][f] + 3*rix[0][f]; - rix[0][1] = LIM(val/3,pix[0][1],pix[0][3]); - } - } - } - -/* Interpolate red and blue values for solitary green pixels: */ - for (row=(top-sgrow+4)/3*3+sgrow; row < mrow-2; row+=3) - for (col=(left-sgcol+4)/3*3+sgcol; col < mcol-2; col+=3) { - rix = &rgb[0][row-top][col-left]; - h = fcol(row,col+1); - memset (diff, 0, sizeof diff); - for (i=1, d=0; d < 6; d++, i^=TS^1, h^=2) { - for (c=0; c < 2; c++, h^=2) { - g = 2*rix[0][1] - rix[i< 1) - diff[d] += SQR (rix[i< 1 && (d & 1)) - if (diff[d-1] < diff[d]) - FORC(2) color[c*2][d] = color[c*2][d-1]; - if (d < 2 || (d & 1)) { - FORC(2) rix[0][c*2] = CLIP(color[c*2][d]/2); - rix += TS*TS; - } - } - } - -/* Interpolate red for blue pixels and vice versa: */ - for (row=top+3; row < mrow-3; row++) - for (col=left+3; col < mcol-3; col++) { - if ((f = 2-fcol(row,col)) == 1) continue; - rix = &rgb[0][row-top][col-left]; - c = (row-sgrow) % 3 ? TS:1; - h = 3 * (c ^ TS ^ 1); - for (d=0; d < 4; d++, rix += TS*TS) { - i = d > 1 || ((d ^ c) & 1) || - ((ABS(rix[0][1]-rix[c][1])+ABS(rix[0][1]-rix[-c][1])) < - 2*(ABS(rix[0][1]-rix[h][1])+ABS(rix[0][1]-rix[-h][1]))) ? c:h; - rix[0][f] = CLIP((rix[i][f] + rix[-i][f] + - 2*rix[0][1] - rix[i][1] - rix[-i][1])/2); - } - } - -/* Fill in red and blue for 2x2 blocks of green: */ - for (row=top+2; row < mrow-2; row++) if ((row-sgrow) % 3) - for (col=left+2; col < mcol-2; col++) if ((col-sgcol) % 3) { - rix = &rgb[0][row-top][col-left]; - hex = allhex[row % 3][col % 3][1]; - for (d=0; d < ndir; d+=2, rix += TS*TS) - if (hex[d] + hex[d+1]) { - g = 3*rix[0][1] - 2*rix[hex[d]][1] - rix[hex[d+1]][1]; - for (c=0; c < 4; c+=2) rix[0][c] = - CLIP((g + 2*rix[hex[d]][c] + rix[hex[d+1]][c])/3); - } else { - g = 2*rix[0][1] - rix[hex[d]][1] - rix[hex[d+1]][1]; - for (c=0; c < 4; c+=2) rix[0][c] = - CLIP((g + rix[hex[d]][c] + rix[hex[d+1]][c])/2); - } - } - } - rgb = (ushort(*)[TS][TS][3]) buffer; - mrow -= top; - mcol -= left; - -/* Convert to CIELab and differentiate in all directions: */ - for (d=0; d < ndir; d++) { - for (row=2; row < mrow-2; row++) - for (col=2; col < mcol-2; col++) - cielab (rgb[d][row][col], lab[row][col]); - for (f=dir[d & 3],row=3; row < mrow-3; row++) - for (col=3; col < mcol-3; col++) { - lix = &lab[row][col]; - g = 2*lix[0][0] - lix[f][0] - lix[-f][0]; - drv[d][row][col] = SQR(g) - + SQR((2*lix[0][1] - lix[f][1] - lix[-f][1] + g*500/232)) - + SQR((2*lix[0][2] - lix[f][2] - lix[-f][2] - g*500/580)); - } - } - -/* Build homogeneity maps from the derivatives: */ - memset(homo, 0, ndir*TS*TS); - for (row=4; row < mrow-4; row++) - for (col=4; col < mcol-4; col++) { - for (tr=FLT_MAX, d=0; d < ndir; d++) - if (tr > drv[d][row][col]) - tr = drv[d][row][col]; - tr *= 8; - for (d=0; d < ndir; d++) - for (v=-1; v <= 1; v++) - for (h=-1; h <= 1; h++) - if (drv[d][row+v][col+h] <= tr) - homo[d][row][col]++; - } - -/* Average the most homogenous pixels for the final result: */ - if (height-top < TS+4) mrow = height-top+2; - if (width-left < TS+4) mcol = width-left+2; - for (row = MIN(top,8); row < mrow-8; row++) - for (col = MIN(left,8); col < mcol-8; col++) { - for (d=0; d < ndir; d++) - for (hm[d]=0, v=-2; v <= 2; v++) - for (h=-2; h <= 2; h++) - hm[d] += homo[d][row+v][col+h]; - for (d=0; d < ndir-4; d++) - if (hm[d] < hm[d+4]) hm[d ] = 0; else - if (hm[d] > hm[d+4]) hm[d+4] = 0; - for (max=hm[0],d=1; d < ndir; d++) - if (max < hm[d]) max = hm[d]; - max -= max >> 3; - memset (avg, 0, sizeof avg); - for (d=0; d < ndir; d++) - if (hm[d] >= max) { - FORC3 avg[c] += rgb[d][row][col][c]; - avg[3]++; - } - FORC3 image[(row+top)*width+col+left][c] = avg[c]/avg[3]; - } - } - free(buffer); - border_interpolate(8); -} -#undef fcol - - -#undef TS - -void CLASS median_filter() -{ - ushort (*pix)[4]; - int pass, c, i, j, k, med[9]; - static const uchar opt[] = /* Optimal 9-element median search */ - { 1,2, 4,5, 7,8, 0,1, 3,4, 6,7, 1,2, 4,5, 7,8, - 0,3, 5,8, 4,7, 3,6, 1,4, 2,5, 4,7, 4,2, 6,4, 4,2 }; - - for (pass=1; pass <= med_passes; pass++) { - if (verbose) - fprintf (stderr,_("Median filter pass %d...\n"), pass); - for (c=0; c < 3; c+=2) { - for (pix = image; pix < image+width*height; pix++) - pix[0][3] = pix[0][c]; - for (pix = image+width; pix < image+width*(height-1); pix++) { - if ((pix-image+1) % width < 2) continue; - for (k=0, i = -width; i <= width; i += width) - for (j = i-1; j <= i+1; j++) - med[k++] = pix[j][3] - pix[j][1]; - for (i=0; i < sizeof opt; i+=2) - if (med[opt[i]] > med[opt[i+1]]) - SWAP (med[opt[i]] , med[opt[i+1]]); - pix[0][c] = CLIP(med[4] + pix[0][1]); - } - } - } -} - -void CLASS blend_highlights() -{ - int clip=INT_MAX, row, col, c, i, j; - static const float trans[2][4][4] = - { { { 1,1,1 }, { 1.7320508,-1.7320508,0 }, { -1,-1,2 } }, - { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; - static const float itrans[2][4][4] = - { { { 1,0.8660254,-0.5 }, { 1,-0.8660254,-0.5 }, { 1,0,1 } }, - { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; - float cam[2][4], lab[2][4], sum[2], chratio; - - if ((unsigned) (colors-3) > 1) return; - if (verbose) fprintf (stderr,_("Blending highlights...\n")); - FORCC if (clip > (i = 65535*pre_mul[c])) clip = i; - for (row=0; row < height; row++) - for (col=0; col < width; col++) { - FORCC if (image[row*width+col][c] > clip) break; - if (c == colors) continue; - FORCC { - cam[0][c] = image[row*width+col][c]; - cam[1][c] = MIN(cam[0][c],clip); - } - for (i=0; i < 2; i++) { - FORCC for (lab[i][c]=j=0; j < colors; j++) - lab[i][c] += trans[colors-3][c][j] * cam[i][j]; - for (sum[i]=0,c=1; c < colors; c++) - sum[i] += SQR(lab[i][c]); - } - chratio = sqrt(sum[1]/sum[0]); - for (c=1; c < colors; c++) - lab[0][c] *= chratio; - FORCC for (cam[0][c]=j=0; j < colors; j++) - cam[0][c] += itrans[colors-3][c][j] * lab[0][j]; - FORCC image[row*width+col][c] = cam[0][c] / colors; - } -} - -#define SCALE (4 >> shrink) -void CLASS recover_highlights() -{ - float *map, sum, wgt, grow; - int hsat[4], count, spread, change, val, i; - unsigned high, wide, mrow, mcol, row, col, kc, c, d, y, x; - ushort *pixel; - static const signed char dir[8][2] = - { {-1,-1}, {-1,0}, {-1,1}, {0,1}, {1,1}, {1,0}, {1,-1}, {0,-1} }; - - if (verbose) fprintf (stderr,_("Rebuilding highlights...\n")); - - grow = pow (2, 4-highlight); - FORCC hsat[c] = 32000 * pre_mul[c]; - for (kc=0, c=1; c < colors; c++) - if (pre_mul[kc] < pre_mul[c]) kc = c; - high = height / SCALE; - wide = width / SCALE; - map = (float *) calloc (high, wide*sizeof *map); - merror (map, "recover_highlights()"); - FORCC if (c != kc) { - memset (map, 0, high*wide*sizeof *map); - for (mrow=0; mrow < high; mrow++) - for (mcol=0; mcol < wide; mcol++) { - sum = wgt = count = 0; - for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) - for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { - pixel = image[row*width+col]; - if (pixel[c] / hsat[c] == 1 && pixel[kc] > 24000) { - sum += pixel[c]; - wgt += pixel[kc]; - count++; - } - } - if (count == SCALE*SCALE) - map[mrow*wide+mcol] = sum / wgt; - } - for (spread = 32/grow; spread--; ) { - for (mrow=0; mrow < high; mrow++) - for (mcol=0; mcol < wide; mcol++) { - if (map[mrow*wide+mcol]) continue; - sum = count = 0; - for (d=0; d < 8; d++) { - y = mrow + dir[d][0]; - x = mcol + dir[d][1]; - if (y < high && x < wide && map[y*wide+x] > 0) { - sum += (1 + (d & 1)) * map[y*wide+x]; - count += 1 + (d & 1); - } - } - if (count > 3) - map[mrow*wide+mcol] = - (sum+grow) / (count+grow); - } - for (change=i=0; i < high*wide; i++) - if (map[i] < 0) { - map[i] = -map[i]; - change = 1; - } - if (!change) break; - } - for (i=0; i < high*wide; i++) - if (map[i] == 0) map[i] = 1; - for (mrow=0; mrow < high; mrow++) - for (mcol=0; mcol < wide; mcol++) { - for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) - for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { - pixel = image[row*width+col]; - if (pixel[c] / hsat[c] > 1) { - val = pixel[kc] * map[mrow*wide+mcol]; - if (pixel[c] < val) pixel[c] = CLIP(val); - } - } - } - } - free (map); -} -#undef SCALE +//void CLASS median_filter() +//{ +// ushort (*pix)[4]; +// int pass, c, i, j, k, med[9]; +// static const uchar opt[] = /* Optimal 9-element median search */ +// { 1,2, 4,5, 7,8, 0,1, 3,4, 6,7, 1,2, 4,5, 7,8, +// 0,3, 5,8, 4,7, 3,6, 1,4, 2,5, 4,7, 4,2, 6,4, 4,2 }; +// +// for (pass=1; pass <= med_passes; pass++) { +// if (verbose) +// fprintf (stderr,_("Median filter pass %d...\n"), pass); +// for (c=0; c < 3; c+=2) { +// for (pix = image; pix < image+width*height; pix++) +// pix[0][3] = pix[0][c]; +// for (pix = image+width; pix < image+width*(height-1); pix++) { +// if ((pix-image+1) % width < 2) continue; +// for (k=0, i = -width; i <= width; i += width) +// for (j = i-1; j <= i+1; j++) +// med[k++] = pix[j][3] - pix[j][1]; +// for (i=0; i < sizeof opt; i+=2) +// if (med[opt[i]] > med[opt[i+1]]) +// SWAP (med[opt[i]] , med[opt[i+1]]); +// pix[0][c] = CLIP(med[4] + pix[0][1]); +// } +// } +// } +//} +// +//void CLASS blend_highlights() +//{ +// int clip=INT_MAX, row, col, c, i, j; +// static const float trans[2][4][4] = +// { { { 1,1,1 }, { 1.7320508,-1.7320508,0 }, { -1,-1,2 } }, +// { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; +// static const float itrans[2][4][4] = +// { { { 1,0.8660254,-0.5 }, { 1,-0.8660254,-0.5 }, { 1,0,1 } }, +// { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; +// float cam[2][4], lab[2][4], sum[2], chratio; +// +// if ((unsigned) (colors-3) > 1) return; +// if (verbose) fprintf (stderr,_("Blending highlights...\n")); +// FORCC if (clip > (i = 65535*pre_mul[c])) clip = i; +// for (row=0; row < height; row++) +// for (col=0; col < width; col++) { +// FORCC if (image[row*width+col][c] > clip) break; +// if (c == colors) continue; +// FORCC { +// cam[0][c] = image[row*width+col][c]; +// cam[1][c] = MIN(cam[0][c],clip); +// } +// for (i=0; i < 2; i++) { +// FORCC for (lab[i][c]=j=0; j < colors; j++) +// lab[i][c] += trans[colors-3][c][j] * cam[i][j]; +// for (sum[i]=0,c=1; c < colors; c++) +// sum[i] += SQR(lab[i][c]); +// } +// chratio = sqrt(sum[1]/sum[0]); +// for (c=1; c < colors; c++) +// lab[0][c] *= chratio; +// FORCC for (cam[0][c]=j=0; j < colors; j++) +// cam[0][c] += itrans[colors-3][c][j] * lab[0][j]; +// FORCC image[row*width+col][c] = cam[0][c] / colors; +// } +//} +// +//#define SCALE (4 >> shrink) +//void CLASS recover_highlights() +//{ +// float *map, sum, wgt, grow; +// int hsat[4], count, spread, change, val, i; +// unsigned high, wide, mrow, mcol, row, col, kc, c, d, y, x; +// ushort *pixel; +// static const signed char dir[8][2] = +// { {-1,-1}, {-1,0}, {-1,1}, {0,1}, {1,1}, {1,0}, {1,-1}, {0,-1} }; +// +// if (verbose) fprintf (stderr,_("Rebuilding highlights...\n")); +// +// grow = pow (2, 4-highlight); +// FORCC hsat[c] = 32000 * pre_mul[c]; +// for (kc=0, c=1; c < colors; c++) +// if (pre_mul[kc] < pre_mul[c]) kc = c; +// high = height / SCALE; +// wide = width / SCALE; +// map = (float *) calloc (high, wide*sizeof *map); +// merror (map, "recover_highlights()"); +// FORCC if (c != kc) { +// memset (map, 0, high*wide*sizeof *map); +// for (mrow=0; mrow < high; mrow++) +// for (mcol=0; mcol < wide; mcol++) { +// sum = wgt = count = 0; +// for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) +// for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { +// pixel = image[row*width+col]; +// if (pixel[c] / hsat[c] == 1 && pixel[kc] > 24000) { +// sum += pixel[c]; +// wgt += pixel[kc]; +// count++; +// } +// } +// if (count == SCALE*SCALE) +// map[mrow*wide+mcol] = sum / wgt; +// } +// for (spread = 32/grow; spread--; ) { +// for (mrow=0; mrow < high; mrow++) +// for (mcol=0; mcol < wide; mcol++) { +// if (map[mrow*wide+mcol]) continue; +// sum = count = 0; +// for (d=0; d < 8; d++) { +// y = mrow + dir[d][0]; +// x = mcol + dir[d][1]; +// if (y < high && x < wide && map[y*wide+x] > 0) { +// sum += (1 + (d & 1)) * map[y*wide+x]; +// count += 1 + (d & 1); +// } +// } +// if (count > 3) +// map[mrow*wide+mcol] = - (sum+grow) / (count+grow); +// } +// for (change=i=0; i < high*wide; i++) +// if (map[i] < 0) { +// map[i] = -map[i]; +// change = 1; +// } +// if (!change) break; +// } +// for (i=0; i < high*wide; i++) +// if (map[i] == 0) map[i] = 1; +// for (mrow=0; mrow < high; mrow++) +// for (mcol=0; mcol < wide; mcol++) { +// for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) +// for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { +// pixel = image[row*width+col]; +// if (pixel[c] / hsat[c] > 1) { +// val = pixel[kc] * map[mrow*wide+mcol]; +// if (pixel[c] < val) pixel[c] = CLIP(val); +// } +// } +// } +// } +// free (map); +//} +//#undef SCALE void CLASS tiff_get (unsigned base, unsigned *tag, unsigned *type, unsigned *len, unsigned *save) @@ -9482,12 +9482,14 @@ dng_skip: adobe_coeff (make, model); if(!strncmp(make, "Samsung", 7) && !strncmp(model, "NX1",3)) adobe_coeff (make, model); - if(!strncmp(make, "Pentax", 6) && !strncmp(model, "K10D",4)) + if(!strncmp(make, "Pentax", 6) && (!strncmp(model, "K10D",4) || !strncmp(model, "K-70",4))) adobe_coeff (make, model); if(!strncmp(make, "Leica", 5) && !strncmp(model, "Q",1)) adobe_coeff (make, model); if(!strncmp(make, "Leica", 5) && !strncmp(model, "SL",2)) adobe_coeff (make, model); + if(!strncmp(make, "XIAOYI", 6) && !strncmp(model, "M1",2)) + adobe_coeff (make, model); if (raw_color) adobe_coeff (make, model); if (load_raw == &CLASS kodak_radc_load_raw) if (raw_color) adobe_coeff ("Apple","Quicktake"); @@ -9533,55 +9535,55 @@ notraw: if (flip == UINT_MAX) flip = 0; } -#ifndef NO_LCMS -void CLASS apply_profile (const char *input, const char *output) -{ - char *prof; - cmsHPROFILE hInProfile=0, hOutProfile=0; - cmsHTRANSFORM hTransform; - FILE *fp; - unsigned size; - - if (strcmp (input, "embed")) - hInProfile = cmsOpenProfileFromFile (input, "r"); - else if (profile_length) { - prof = (char *) malloc (profile_length); - merror (prof, "apply_profile()"); - fseek (ifp, profile_offset, SEEK_SET); - fread (prof, 1, profile_length, ifp); - hInProfile = cmsOpenProfileFromMem (prof, profile_length); - free (prof); - } else - fprintf (stderr,_("%s has no embedded profile.\n"), ifname); - if (!hInProfile) return; - if (!output) - hOutProfile = cmsCreate_sRGBProfile(); - else if ((fp = fopen (output, "rb"))) { - fread (&size, 4, 1, fp); - fseek (fp, 0, SEEK_SET); - oprof = (unsigned *) malloc (size = ntohl(size)); - merror (oprof, "apply_profile()"); - fread (oprof, 1, size, fp); - fclose (fp); - if (!(hOutProfile = cmsOpenProfileFromMem (oprof, size))) { - free (oprof); - oprof = 0; - } - } else - fprintf (stderr,_("Cannot open file %s!\n"), output); - if (!hOutProfile) goto quit; - if (verbose) - fprintf (stderr,_("Applying color profile...\n")); - hTransform = cmsCreateTransform (hInProfile, TYPE_RGBA_16, - hOutProfile, TYPE_RGBA_16, INTENT_PERCEPTUAL, 0); - cmsDoTransform (hTransform, image, image, width*height); - raw_color = 1; /* Don't use rgb_cam with a profile */ - cmsDeleteTransform (hTransform); - cmsCloseProfile (hOutProfile); -quit: - cmsCloseProfile (hInProfile); -} -#endif +//#ifndef NO_LCMS +//void CLASS apply_profile (const char *input, const char *output) +//{ +// char *prof; +// cmsHPROFILE hInProfile=0, hOutProfile=0; +// cmsHTRANSFORM hTransform; +// FILE *fp; +// unsigned size; +// +// if (strcmp (input, "embed")) +// hInProfile = cmsOpenProfileFromFile (input, "r"); +// else if (profile_length) { +// prof = (char *) malloc (profile_length); +// merror (prof, "apply_profile()"); +// fseek (ifp, profile_offset, SEEK_SET); +// fread (prof, 1, profile_length, ifp); +// hInProfile = cmsOpenProfileFromMem (prof, profile_length); +// free (prof); +// } else +// fprintf (stderr,_("%s has no embedded profile.\n"), ifname); +// if (!hInProfile) return; +// if (!output) +// hOutProfile = cmsCreate_sRGBProfile(); +// else if ((fp = fopen (output, "rb"))) { +// fread (&size, 4, 1, fp); +// fseek (fp, 0, SEEK_SET); +// oprof = (unsigned *) malloc (size = ntohl(size)); +// merror (oprof, "apply_profile()"); +// fread (oprof, 1, size, fp); +// fclose (fp); +// if (!(hOutProfile = cmsOpenProfileFromMem (oprof, size))) { +// free (oprof); +// oprof = 0; +// } +// } else +// fprintf (stderr,_("Cannot open file %s!\n"), output); +// if (!hOutProfile) goto quit; +// if (verbose) +// fprintf (stderr,_("Applying color profile...\n")); +// hTransform = cmsCreateTransform (hInProfile, TYPE_RGBA_16, +// hOutProfile, TYPE_RGBA_16, INTENT_PERCEPTUAL, 0); +// cmsDoTransform (hTransform, image, image, width*height); +// raw_color = 1; /* Don't use rgb_cam with a profile */ +// cmsDeleteTransform (hTransform); +// cmsCloseProfile (hOutProfile); +//quit: +// cmsCloseProfile (hInProfile); +//} +//#endif /* RT: DNG Float */ diff --git a/rtengine/dcraw.h b/rtengine/dcraw.h index 405f202bd..0a68b02cc 100644 --- a/rtengine/dcraw.h +++ b/rtengine/dcraw.h @@ -43,14 +43,14 @@ public: :exif_base(-1) ,ciff_base(-1) ,ciff_len(0) - ,ifp(NULL),ofp(NULL) + ,ifp(nullptr),ofp(nullptr) ,order(0x4949) - ,ifname(NULL) - ,meta_data(NULL) + ,ifname(nullptr) + ,meta_data(nullptr) ,shot_select(0),multi_out(0) - ,float_raw_image(NULL) - ,image(NULL) - ,bright(1.),threshold(0.) + ,float_raw_image(nullptr) + ,image(nullptr) + ,bright(1.) ,half_size(0),four_color_rgb(0),document_mode(0),highlight(0) ,verbose(0) ,use_auto_wb(0),use_camera_wb(0),use_camera_matrix(1) @@ -344,23 +344,23 @@ void foveon_make_curves(short **curvep, float dq[3], float div[3], float filt); int foveon_apply_curve (short *curve, int i); void foveon_interpolate(); -void xtrans_interpolate (int passes); -void cielab (ushort rgb[3], short lab[3]); +//void xtrans_interpolate (int passes); +//void cielab (ushort rgb[3], short lab[3]); -void remove_zeroes(); -void bad_pixels (const char *cfname); -void subtract (const char *fname); +//void remove_zeroes(); +//void bad_pixels (const char *cfname); +//void subtract (const char *fname); void gamma_curve (double pwr, double ts, int mode, int imax); void pseudoinverse (double (*in)[3], double (*out)[3], int size); void cam_xyz_coeff (float rgb_cam[3][4], double cam_xyz[4][3]); -void hat_transform (float *temp, float *base, int st, int size, int sc); -void wavelet_denoise(); +//void hat_transform (float *temp, float *base, int st, int size, int sc); +//void wavelet_denoise(); void scale_colors(); void pre_interpolate(); -void border_interpolate (int border); -void median_filter(); -void blend_highlights(); -void recover_highlights(); +//void border_interpolate (int border); +//void median_filter(); +//void blend_highlights(); +//void recover_highlights(); void crop_masked_pixels(); void tiff_get (unsigned base, unsigned *tag, unsigned *type, unsigned *len, unsigned *save); @@ -397,7 +397,6 @@ void simple_coeff (int index); short guess_byte_order (int words); float find_green (int bps, int bite, int off0, int off1); void identify(); -void apply_profile (const char *input, const char *output); void jpeg_thumb() {} // not needed bool dcraw_coeff_overrides(const char make[], const char model[], int iso_speed, short trans[12], int *black_level, int *white_level); void shiftXtransMatrix( const int offsy, const int offsx) { diff --git a/rtengine/dcraw.patch b/rtengine/dcraw.patch index 82f2ec9b8..22c53d831 100644 --- a/rtengine/dcraw.patch +++ b/rtengine/dcraw.patch @@ -1,5 +1,5 @@ ---- dcraw.c 2016-09-30 21:19:28.312191811 +0200 -+++ dcraw.cc 2016-09-30 22:41:28.157442526 +0200 +--- dcraw.c 2016-10-28 13:45:27 +0000 ++++ dcraw.cc 2016-10-31 13:35:15 +0000 @@ -1,3 +1,16 @@ +/*RT*/#include +/*RT*/#include @@ -833,10 +833,468 @@ if (mask[0][3] > 0) goto mask_set; if (load_raw == &CLASS canon_load_raw || load_raw == &CLASS lossless_jpeg_load_raw) { -@@ -4366,239 +4690,8 @@ - } +@@ -3808,127 +4132,127 @@ + } } +-void CLASS remove_zeroes() +-{ +- unsigned row, col, tot, n, r, c; +- +- for (row=0; row < height; row++) +- for (col=0; col < width; col++) +- if (BAYER(row,col) == 0) { +- tot = n = 0; +- for (r = row-2; r <= row+2; r++) +- for (c = col-2; c <= col+2; c++) +- if (r < height && c < width && +- FC(r,c) == FC(row,col) && BAYER(r,c)) +- tot += (n++,BAYER(r,c)); +- if (n) BAYER(row,col) = tot/n; +- } +-} ++//void CLASS remove_zeroes() ++//{ ++// unsigned row, col, tot, n, r, c; ++// ++// for (row=0; row < height; row++) ++// for (col=0; col < width; col++) ++// if (BAYER(row,col) == 0) { ++// tot = n = 0; ++// for (r = row-2; r <= row+2; r++) ++// for (c = col-2; c <= col+2; c++) ++// if (r < height && c < width && ++// FC(r,c) == FC(row,col) && BAYER(r,c)) ++// tot += (n++,BAYER(r,c)); ++// if (n) BAYER(row,col) = tot/n; ++// } ++//} + + /* + Seach from the current directory up to the root looking for + a ".badpixels" file, and fix those pixels now. + */ +-void CLASS bad_pixels (const char *cfname) +-{ +- FILE *fp=0; +- char *fname, *cp, line[128]; +- int len, time, row, col, r, c, rad, tot, n, fixed=0; +- +- if (!filters) return; +- if (cfname) +- fp = fopen (cfname, "r"); +- else { +- for (len=32 ; ; len *= 2) { +- fname = (char *) malloc (len); +- if (!fname) return; +- if (getcwd (fname, len-16)) break; +- free (fname); +- if (errno != ERANGE) return; +- } +-#if defined(WIN32) || defined(DJGPP) +- if (fname[1] == ':') +- memmove (fname, fname+2, len-2); +- for (cp=fname; *cp; cp++) +- if (*cp == '\\') *cp = '/'; +-#endif +- cp = fname + strlen(fname); +- if (cp[-1] == '/') cp--; +- while (*fname == '/') { +- strcpy (cp, "/.badpixels"); +- if ((fp = fopen (fname, "r"))) break; +- if (cp == fname) break; +- while (*--cp != '/'); +- } +- free (fname); +- } +- if (!fp) return; +- while (fgets (line, 128, fp)) { +- cp = strchr (line, '#'); +- if (cp) *cp = 0; +- if (sscanf (line, "%d %d %d", &col, &row, &time) != 3) continue; +- if ((unsigned) col >= width || (unsigned) row >= height) continue; +- if (time > timestamp) continue; +- for (tot=n=0, rad=1; rad < 3 && n==0; rad++) +- for (r = row-rad; r <= row+rad; r++) +- for (c = col-rad; c <= col+rad; c++) +- if ((unsigned) r < height && (unsigned) c < width && +- (r != row || c != col) && fcol(r,c) == fcol(row,col)) { +- tot += BAYER2(r,c); +- n++; +- } +- BAYER2(row,col) = tot/n; +- if (verbose) { +- if (!fixed++) +- fprintf (stderr,_("Fixed dead pixels at:")); +- fprintf (stderr, " %d,%d", col, row); +- } +- } +- if (fixed) fputc ('\n', stderr); +- fclose (fp); +-} +- +-void CLASS subtract (const char *fname) +-{ +- FILE *fp; +- int dim[3]={0,0,0}, comment=0, number=0, error=0, nd=0, c, row, col; +- ushort *pixel; +- +- if (!(fp = fopen (fname, "rb"))) { +- perror (fname); return; +- } +- if (fgetc(fp) != 'P' || fgetc(fp) != '5') error = 1; +- while (!error && nd < 3 && (c = fgetc(fp)) != EOF) { +- if (c == '#') comment = 1; +- if (c == '\n') comment = 0; +- if (comment) continue; +- if (isdigit(c)) number = 1; +- if (number) { +- if (isdigit(c)) dim[nd] = dim[nd]*10 + c -'0'; +- else if (isspace(c)) { +- number = 0; nd++; +- } else error = 1; +- } +- } +- if (error || nd < 3) { +- fprintf (stderr,_("%s is not a valid PGM file!\n"), fname); +- fclose (fp); return; +- } else if (dim[0] != width || dim[1] != height || dim[2] != 65535) { +- fprintf (stderr,_("%s has the wrong dimensions!\n"), fname); +- fclose (fp); return; +- } +- pixel = (ushort *) calloc (width, sizeof *pixel); +- merror (pixel, "subtract()"); +- for (row=0; row < height; row++) { +- fread (pixel, 2, width, fp); +- for (col=0; col < width; col++) +- BAYER(row,col) = MAX (BAYER(row,col) - ntohs(pixel[col]), 0); +- } +- free (pixel); +- fclose (fp); +- memset (cblack, 0, sizeof cblack); +- black = 0; +-} ++//void CLASS bad_pixels (const char *cfname) ++//{ ++// FILE *fp=0; ++// char *fname, *cp, line[128]; ++// int len, time, row, col, r, c, rad, tot, n, fixed=0; ++// ++// if (!filters) return; ++// if (cfname) ++// fp = fopen (cfname, "r"); ++// else { ++// for (len=32 ; ; len *= 2) { ++// fname = (char *) malloc (len); ++// if (!fname) return; ++// if (getcwd (fname, len-16)) break; ++// free (fname); ++// if (errno != ERANGE) return; ++// } ++//#if defined(WIN32) || defined(DJGPP) ++// if (fname[1] == ':') ++// memmove (fname, fname+2, len-2); ++// for (cp=fname; *cp; cp++) ++// if (*cp == '\\') *cp = '/'; ++//#endif ++// cp = fname + strlen(fname); ++// if (cp[-1] == '/') cp--; ++// while (*fname == '/') { ++// strcpy (cp, "/.badpixels"); ++// if ((fp = fopen (fname, "r"))) break; ++// if (cp == fname) break; ++// while (*--cp != '/'); ++// } ++// free (fname); ++// } ++// if (!fp) return; ++// while (fgets (line, 128, fp)) { ++// cp = strchr (line, '#'); ++// if (cp) *cp = 0; ++// if (sscanf (line, "%d %d %d", &col, &row, &time) != 3) continue; ++// if ((unsigned) col >= width || (unsigned) row >= height) continue; ++// if (time > timestamp) continue; ++// for (tot=n=0, rad=1; rad < 3 && n==0; rad++) ++// for (r = row-rad; r <= row+rad; r++) ++// for (c = col-rad; c <= col+rad; c++) ++// if ((unsigned) r < height && (unsigned) c < width && ++// (r != row || c != col) && fcol(r,c) == fcol(row,col)) { ++// tot += BAYER2(r,c); ++// n++; ++// } ++// BAYER2(row,col) = tot/n; ++// if (verbose) { ++// if (!fixed++) ++// fprintf (stderr,_("Fixed dead pixels at:")); ++// fprintf (stderr, " %d,%d", col, row); ++// } ++// } ++// if (fixed) fputc ('\n', stderr); ++// fclose (fp); ++//} ++ ++//void CLASS subtract (const char *fname) ++//{ ++// FILE *fp; ++// int dim[3]={0,0,0}, comment=0, number=0, error=0, nd=0, c, row, col; ++// ushort *pixel; ++// ++// if (!(fp = fopen (fname, "rb"))) { ++// perror (fname); return; ++// } ++// if (fgetc(fp) != 'P' || fgetc(fp) != '5') error = 1; ++// while (!error && nd < 3 && (c = fgetc(fp)) != EOF) { ++// if (c == '#') comment = 1; ++// if (c == '\n') comment = 0; ++// if (comment) continue; ++// if (isdigit(c)) number = 1; ++// if (number) { ++// if (isdigit(c)) dim[nd] = dim[nd]*10 + c -'0'; ++// else if (isspace(c)) { ++// number = 0; nd++; ++// } else error = 1; ++// } ++// } ++// if (error || nd < 3) { ++// fprintf (stderr,_("%s is not a valid PGM file!\n"), fname); ++// fclose (fp); return; ++// } else if (dim[0] != width || dim[1] != height || dim[2] != 65535) { ++// fprintf (stderr,_("%s has the wrong dimensions!\n"), fname); ++// fclose (fp); return; ++// } ++// pixel = (ushort *) calloc (width, sizeof *pixel); ++// merror (pixel, "subtract()"); ++// for (row=0; row < height; row++) { ++// fread (pixel, 2, width, fp); ++// for (col=0; col < width; col++) ++// BAYER(row,col) = MAX (BAYER(row,col) - ntohs(pixel[col]), 0); ++// } ++// free (pixel); ++// fclose (fp); ++// memset (cblack, 0, sizeof cblack); ++// black = 0; ++//} + + void CLASS gamma_curve (double pwr, double ts, int mode, int imax) + { +@@ -4093,94 +4417,94 @@ + } + #endif + +-void CLASS hat_transform (float *temp, float *base, int st, int size, int sc) +-{ +- int i; +- for (i=0; i < sc; i++) +- temp[i] = 2*base[st*i] + base[st*(sc-i)] + base[st*(i+sc)]; +- for (; i+sc < size; i++) +- temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(i+sc)]; +- for (; i < size; i++) +- temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(2*size-2-(i+sc))]; +-} +- +-void CLASS wavelet_denoise() +-{ +- float *fimg=0, *temp, thold, mul[2], avg, diff; +- int scale=1, size, lev, hpass, lpass, row, col, nc, c, i, wlast, blk[2]; +- ushort *window[4]; +- static const float noise[] = +- { 0.8002,0.2735,0.1202,0.0585,0.0291,0.0152,0.0080,0.0044 }; +- +- if (verbose) fprintf (stderr,_("Wavelet denoising...\n")); +- +- while (maximum << scale < 0x10000) scale++; +- maximum <<= --scale; +- black <<= scale; +- FORC4 cblack[c] <<= scale; +- if ((size = iheight*iwidth) < 0x15550000) +- fimg = (float *) malloc ((size*3 + iheight + iwidth) * sizeof *fimg); +- merror (fimg, "wavelet_denoise()"); +- temp = fimg + size*3; +- if ((nc = colors) == 3 && filters) nc++; +- FORC(nc) { /* denoise R,G1,B,G3 individually */ +- for (i=0; i < size; i++) +- fimg[i] = 256 * sqrt(image[i][c] << scale); +- for (hpass=lev=0; lev < 5; lev++) { +- lpass = size*((lev & 1)+1); +- for (row=0; row < iheight; row++) { +- hat_transform (temp, fimg+hpass+row*iwidth, 1, iwidth, 1 << lev); +- for (col=0; col < iwidth; col++) +- fimg[lpass + row*iwidth + col] = temp[col] * 0.25; +- } +- for (col=0; col < iwidth; col++) { +- hat_transform (temp, fimg+lpass+col, iwidth, iheight, 1 << lev); +- for (row=0; row < iheight; row++) +- fimg[lpass + row*iwidth + col] = temp[row] * 0.25; +- } +- thold = threshold * noise[lev]; +- for (i=0; i < size; i++) { +- fimg[hpass+i] -= fimg[lpass+i]; +- if (fimg[hpass+i] < -thold) fimg[hpass+i] += thold; +- else if (fimg[hpass+i] > thold) fimg[hpass+i] -= thold; +- else fimg[hpass+i] = 0; +- if (hpass) fimg[i] += fimg[hpass+i]; +- } +- hpass = lpass; +- } +- for (i=0; i < size; i++) +- image[i][c] = CLIP(SQR(fimg[i]+fimg[lpass+i])/0x10000); +- } +- if (filters && colors == 3) { /* pull G1 and G3 closer together */ +- for (row=0; row < 2; row++) { +- mul[row] = 0.125 * pre_mul[FC(row+1,0) | 1] / pre_mul[FC(row,0) | 1]; +- blk[row] = cblack[FC(row,0) | 1]; +- } +- for (i=0; i < 4; i++) +- window[i] = (ushort *) fimg + width*i; +- for (wlast=-1, row=1; row < height-1; row++) { +- while (wlast < row+1) { +- for (wlast++, i=0; i < 4; i++) +- window[(i+3) & 3] = window[i]; +- for (col = FC(wlast,1) & 1; col < width; col+=2) +- window[2][col] = BAYER(wlast,col); +- } +- thold = threshold/512; +- for (col = (FC(row,0) & 1)+1; col < width-1; col+=2) { +- avg = ( window[0][col-1] + window[0][col+1] + +- window[2][col-1] + window[2][col+1] - blk[~row & 1]*4 ) +- * mul[row & 1] + (window[1][col] + blk[row & 1]) * 0.5; +- avg = avg < 0 ? 0 : sqrt(avg); +- diff = sqrt(BAYER(row,col)) - avg; +- if (diff < -thold) diff += thold; +- else if (diff > thold) diff -= thold; +- else diff = 0; +- BAYER(row,col) = CLIP(SQR(avg+diff) + 0.5); +- } +- } +- } +- free (fimg); +-} ++//void CLASS hat_transform (float *temp, float *base, int st, int size, int sc) ++//{ ++// int i; ++// for (i=0; i < sc; i++) ++// temp[i] = 2*base[st*i] + base[st*(sc-i)] + base[st*(i+sc)]; ++// for (; i+sc < size; i++) ++// temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(i+sc)]; ++// for (; i < size; i++) ++// temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(2*size-2-(i+sc))]; ++//} ++ ++//void CLASS wavelet_denoise() ++//{ ++// float *fimg=0, *temp, thold, mul[2], avg, diff; ++// int scale=1, size, lev, hpass, lpass, row, col, nc, c, i, wlast, blk[2]; ++// ushort *window[4]; ++// static const float noise[] = ++// { 0.8002,0.2735,0.1202,0.0585,0.0291,0.0152,0.0080,0.0044 }; ++// ++// if (verbose) fprintf (stderr,_("Wavelet denoising...\n")); ++// ++// while (maximum << scale < 0x10000) scale++; ++// maximum <<= --scale; ++// black <<= scale; ++// FORC4 cblack[c] <<= scale; ++// if ((size = iheight*iwidth) < 0x15550000) ++// fimg = (float *) malloc ((size*3 + iheight + iwidth) * sizeof *fimg); ++// merror (fimg, "wavelet_denoise()"); ++// temp = fimg + size*3; ++// if ((nc = colors) == 3 && filters) nc++; ++// FORC(nc) { /* denoise R,G1,B,G3 individually */ ++// for (i=0; i < size; i++) ++// fimg[i] = 256 * sqrt(image[i][c] << scale); ++// for (hpass=lev=0; lev < 5; lev++) { ++// lpass = size*((lev & 1)+1); ++// for (row=0; row < iheight; row++) { ++// hat_transform (temp, fimg+hpass+row*iwidth, 1, iwidth, 1 << lev); ++// for (col=0; col < iwidth; col++) ++// fimg[lpass + row*iwidth + col] = temp[col] * 0.25; ++// } ++// for (col=0; col < iwidth; col++) { ++// hat_transform (temp, fimg+lpass+col, iwidth, iheight, 1 << lev); ++// for (row=0; row < iheight; row++) ++// fimg[lpass + row*iwidth + col] = temp[row] * 0.25; ++// } ++// thold = threshold * noise[lev]; ++// for (i=0; i < size; i++) { ++// fimg[hpass+i] -= fimg[lpass+i]; ++// if (fimg[hpass+i] < -thold) fimg[hpass+i] += thold; ++// else if (fimg[hpass+i] > thold) fimg[hpass+i] -= thold; ++// else fimg[hpass+i] = 0; ++// if (hpass) fimg[i] += fimg[hpass+i]; ++// } ++// hpass = lpass; ++// } ++// for (i=0; i < size; i++) ++// image[i][c] = CLIP(SQR(fimg[i]+fimg[lpass+i])/0x10000); ++// } ++// if (filters && colors == 3) { /* pull G1 and G3 closer together */ ++// for (row=0; row < 2; row++) { ++// mul[row] = 0.125 * pre_mul[FC(row+1,0) | 1] / pre_mul[FC(row,0) | 1]; ++// blk[row] = cblack[FC(row,0) | 1]; ++// } ++// for (i=0; i < 4; i++) ++// window[i] = (ushort *) fimg + width*i; ++// for (wlast=-1, row=1; row < height-1; row++) { ++// while (wlast < row+1) { ++// for (wlast++, i=0; i < 4; i++) ++// window[(i+3) & 3] = window[i]; ++// for (col = FC(wlast,1) & 1; col < width; col+=2) ++// window[2][col] = BAYER(wlast,col); ++// } ++// thold = threshold/512; ++// for (col = (FC(row,0) & 1)+1; col < width-1; col+=2) { ++// avg = ( window[0][col-1] + window[0][col+1] + ++// window[2][col-1] + window[2][col+1] - blk[~row & 1]*4 ) ++// * mul[row & 1] + (window[1][col] + blk[row & 1]) * 0.5; ++// avg = avg < 0 ? 0 : sqrt(avg); ++// diff = sqrt(BAYER(row,col)) - avg; ++// if (diff < -thold) diff += thold; ++// else if (diff > thold) diff -= thold; ++// else diff = 0; ++// BAYER(row,col) = CLIP(SQR(avg+diff) + 0.5); ++// } ++// } ++// } ++// free (fimg); ++//} + + void CLASS scale_colors() + { +@@ -4238,7 +4562,7 @@ + if (pre_mul[3] == 0) pre_mul[3] = colors < 4 ? pre_mul[1] : 1; + dark = black; + sat = maximum; +- if (threshold) wavelet_denoise(); ++// if (threshold) wavelet_denoise(); + maximum -= black; + for (dmin=DBL_MAX, dmax=c=0; c < 4; c++) { + if (dmin > pre_mul[c]) +@@ -4344,776 +4668,440 @@ + if (half_size) filters = 0; + } + +-void CLASS border_interpolate (int border) +-{ +- unsigned row, col, y, x, f, c, sum[8]; +- +- for (row=0; row < height; row++) +- for (col=0; col < width; col++) { +- if (col==border && row >= border && row < height-border) +- col = width-border; +- memset (sum, 0, sizeof sum); +- for (y=row-1; y != row+2; y++) +- for (x=col-1; x != col+2; x++) +- if (y < height && x < width) { +- f = fcol(y,x); +- sum[f] += image[y*width+x][f]; +- sum[f+4]++; +- } +- f = fcol(row,col); +- FORCC if (c != f && sum[c+4]) +- image[row*width+col][c] = sum[c] / sum[c+4]; +- } +-} +- -void CLASS lin_interpolate() -{ - int code[16][16][32], size=16, *ip, sum[4]; @@ -884,8 +1342,7 @@ - This algorithm is officially called: - - "Interpolation using a Threshold-based variable number of gradients" -+/* RT: delete interpolation functions */ - +- - described in http://scien.stanford.edu/pages/labsite/1999/psych221/projects/99/tingchen/algodep/vargra.html - - I've extended the basic idea to work with non-Bayer filter arrays. @@ -1071,13 +1528,271 @@ - pix[0][c] = CLIP((guess[0]+guess[1]) >> 2); - } -} - - void CLASS cielab (ushort rgb[3], short lab[3]) - { -@@ -4864,112 +4957,7 @@ - } - #undef fcol - +- +-void CLASS cielab (ushort rgb[3], short lab[3]) +-{ +- int c, i, j, k; +- float r, xyz[3]; +- static float cbrt[0x10000], xyz_cam[3][4]; +- +- if (!rgb) { +- for (i=0; i < 0x10000; i++) { +- r = i / 65535.0; +- cbrt[i] = r > 0.008856 ? pow(r,1/3.0) : 7.787*r + 16/116.0; +- } +- for (i=0; i < 3; i++) +- for (j=0; j < colors; j++) +- for (xyz_cam[i][j] = k=0; k < 3; k++) +- xyz_cam[i][j] += xyz_rgb[i][k] * rgb_cam[k][j] / d65_white[i]; +- return; +- } +- xyz[0] = xyz[1] = xyz[2] = 0.5; +- FORCC { +- xyz[0] += xyz_cam[0][c] * rgb[c]; +- xyz[1] += xyz_cam[1][c] * rgb[c]; +- xyz[2] += xyz_cam[2][c] * rgb[c]; +- } +- xyz[0] = cbrt[CLIP((int) xyz[0])]; +- xyz[1] = cbrt[CLIP((int) xyz[1])]; +- xyz[2] = cbrt[CLIP((int) xyz[2])]; +- lab[0] = 64 * (116 * xyz[1] - 16); +- lab[1] = 64 * 500 * (xyz[0] - xyz[1]); +- lab[2] = 64 * 200 * (xyz[1] - xyz[2]); +-} +- +-#define TS 512 /* Tile Size */ +-#define fcol(row,col) xtrans[(row+6) % 6][(col+6) % 6] +- +-/* +- Frank Markesteijn's algorithm for Fuji X-Trans sensors +- */ +-void CLASS xtrans_interpolate (int passes) +-{ +- int c, d, f, g, h, i, v, ng, row, col, top, left, mrow, mcol; +- int val, ndir, pass, hm[8], avg[4], color[3][8]; +- static const short orth[12] = { 1,0,0,1,-1,0,0,-1,1,0,0,1 }, +- patt[2][16] = { { 0,1,0,-1,2,0,-1,0,1,1,1,-1,0,0,0,0 }, +- { 0,1,0,-2,1,0,-2,0,1,1,-2,-2,1,-1,-1,1 } }, +- dir[4] = { 1,TS,TS+1,TS-1 }; +- short allhex[3][3][2][8], *hex; +- ushort min, max, sgrow, sgcol; +- ushort (*rgb)[TS][TS][3], (*rix)[3], (*pix)[4]; +- short (*lab) [TS][3], (*lix)[3]; +- float (*drv)[TS][TS], diff[6], tr; +- char (*homo)[TS][TS], *buffer; +- +- if (verbose) +- fprintf (stderr,_("%d-pass X-Trans interpolation...\n"), passes); +- +- cielab (0,0); +- ndir = 4 << (passes > 1); +- buffer = (char *) malloc (TS*TS*(ndir*11+6)); +- merror (buffer, "xtrans_interpolate()"); +- rgb = (ushort(*)[TS][TS][3]) buffer; +- lab = (short (*) [TS][3])(buffer + TS*TS*(ndir*6)); +- drv = (float (*)[TS][TS]) (buffer + TS*TS*(ndir*6+6)); +- homo = (char (*)[TS][TS]) (buffer + TS*TS*(ndir*10+6)); +- +-/* Map a green hexagon around each non-green pixel and vice versa: */ +- for (row=0; row < 3; row++) +- for (col=0; col < 3; col++) +- for (ng=d=0; d < 10; d+=2) { +- g = fcol(row,col) == 1; +- if (fcol(row+orth[d],col+orth[d+2]) == 1) ng=0; else ng++; +- if (ng == 4) { sgrow = row; sgcol = col; } +- if (ng == g+1) FORC(8) { +- v = orth[d ]*patt[g][c*2] + orth[d+1]*patt[g][c*2+1]; +- h = orth[d+2]*patt[g][c*2] + orth[d+3]*patt[g][c*2+1]; +- allhex[row][col][0][c^(g*2 & d)] = h + v*width; +- allhex[row][col][1][c^(g*2 & d)] = h + v*TS; +- } +- } +- +-/* Set green1 and green3 to the minimum and maximum allowed values: */ +- for (row=2; row < height-2; row++) +- for (min=~(max=0), col=2; col < width-2; col++) { +- if (fcol(row,col) == 1 && (min=~(max=0))) continue; +- pix = image + row*width + col; +- hex = allhex[row % 3][col % 3][0]; +- if (!max) FORC(6) { +- val = pix[hex[c]][1]; +- if (min > val) min = val; +- if (max < val) max = val; +- } +- pix[0][1] = min; +- pix[0][3] = max; +- switch ((row-sgrow) % 3) { +- case 1: if (row < height-3) { row++; col--; } break; +- case 2: if ((min=~(max=0)) && (col+=2) < width-3 && row > 2) row--; +- } +- } +- +- for (top=3; top < height-19; top += TS-16) +- for (left=3; left < width-19; left += TS-16) { +- mrow = MIN (top+TS, height-3); +- mcol = MIN (left+TS, width-3); +- for (row=top; row < mrow; row++) +- for (col=left; col < mcol; col++) +- memcpy (rgb[0][row-top][col-left], image[row*width+col], 6); +- FORC3 memcpy (rgb[c+1], rgb[0], sizeof *rgb); +- +-/* Interpolate green horizontally, vertically, and along both diagonals: */ +- for (row=top; row < mrow; row++) +- for (col=left; col < mcol; col++) { +- if ((f = fcol(row,col)) == 1) continue; +- pix = image + row*width + col; +- hex = allhex[row % 3][col % 3][0]; +- color[1][0] = 174 * (pix[ hex[1]][1] + pix[ hex[0]][1]) - +- 46 * (pix[2*hex[1]][1] + pix[2*hex[0]][1]); +- color[1][1] = 223 * pix[ hex[3]][1] + pix[ hex[2]][1] * 33 + +- 92 * (pix[ 0 ][f] - pix[ -hex[2]][f]); +- FORC(2) color[1][2+c] = +- 164 * pix[hex[4+c]][1] + 92 * pix[-2*hex[4+c]][1] + 33 * +- (2*pix[0][f] - pix[3*hex[4+c]][f] - pix[-3*hex[4+c]][f]); +- FORC4 rgb[c^!((row-sgrow) % 3)][row-top][col-left][1] = +- LIM(color[1][c] >> 8,pix[0][1],pix[0][3]); +- } +- +- for (pass=0; pass < passes; pass++) { +- if (pass == 1) +- memcpy (rgb+=4, buffer, 4*sizeof *rgb); +- +-/* Recalculate green from interpolated values of closer pixels: */ +- if (pass) { +- for (row=top+2; row < mrow-2; row++) +- for (col=left+2; col < mcol-2; col++) { +- if ((f = fcol(row,col)) == 1) continue; +- pix = image + row*width + col; +- hex = allhex[row % 3][col % 3][1]; +- for (d=3; d < 6; d++) { +- rix = &rgb[(d-2)^!((row-sgrow) % 3)][row-top][col-left]; +- val = rix[-2*hex[d]][1] + 2*rix[hex[d]][1] +- - rix[-2*hex[d]][f] - 2*rix[hex[d]][f] + 3*rix[0][f]; +- rix[0][1] = LIM(val/3,pix[0][1],pix[0][3]); +- } +- } +- } +- +-/* Interpolate red and blue values for solitary green pixels: */ +- for (row=(top-sgrow+4)/3*3+sgrow; row < mrow-2; row+=3) +- for (col=(left-sgcol+4)/3*3+sgcol; col < mcol-2; col+=3) { +- rix = &rgb[0][row-top][col-left]; +- h = fcol(row,col+1); +- memset (diff, 0, sizeof diff); +- for (i=1, d=0; d < 6; d++, i^=TS^1, h^=2) { +- for (c=0; c < 2; c++, h^=2) { +- g = 2*rix[0][1] - rix[i< 1) +- diff[d] += SQR (rix[i< 1 && (d & 1)) +- if (diff[d-1] < diff[d]) +- FORC(2) color[c*2][d] = color[c*2][d-1]; +- if (d < 2 || (d & 1)) { +- FORC(2) rix[0][c*2] = CLIP(color[c*2][d]/2); +- rix += TS*TS; +- } +- } +- } +- +-/* Interpolate red for blue pixels and vice versa: */ +- for (row=top+3; row < mrow-3; row++) +- for (col=left+3; col < mcol-3; col++) { +- if ((f = 2-fcol(row,col)) == 1) continue; +- rix = &rgb[0][row-top][col-left]; +- c = (row-sgrow) % 3 ? TS:1; +- h = 3 * (c ^ TS ^ 1); +- for (d=0; d < 4; d++, rix += TS*TS) { +- i = d > 1 || ((d ^ c) & 1) || +- ((ABS(rix[0][1]-rix[c][1])+ABS(rix[0][1]-rix[-c][1])) < +- 2*(ABS(rix[0][1]-rix[h][1])+ABS(rix[0][1]-rix[-h][1]))) ? c:h; +- rix[0][f] = CLIP((rix[i][f] + rix[-i][f] + +- 2*rix[0][1] - rix[i][1] - rix[-i][1])/2); +- } +- } +- +-/* Fill in red and blue for 2x2 blocks of green: */ +- for (row=top+2; row < mrow-2; row++) if ((row-sgrow) % 3) +- for (col=left+2; col < mcol-2; col++) if ((col-sgcol) % 3) { +- rix = &rgb[0][row-top][col-left]; +- hex = allhex[row % 3][col % 3][1]; +- for (d=0; d < ndir; d+=2, rix += TS*TS) +- if (hex[d] + hex[d+1]) { +- g = 3*rix[0][1] - 2*rix[hex[d]][1] - rix[hex[d+1]][1]; +- for (c=0; c < 4; c+=2) rix[0][c] = +- CLIP((g + 2*rix[hex[d]][c] + rix[hex[d+1]][c])/3); +- } else { +- g = 2*rix[0][1] - rix[hex[d]][1] - rix[hex[d+1]][1]; +- for (c=0; c < 4; c+=2) rix[0][c] = +- CLIP((g + rix[hex[d]][c] + rix[hex[d+1]][c])/2); +- } +- } +- } +- rgb = (ushort(*)[TS][TS][3]) buffer; +- mrow -= top; +- mcol -= left; +- +-/* Convert to CIELab and differentiate in all directions: */ +- for (d=0; d < ndir; d++) { +- for (row=2; row < mrow-2; row++) +- for (col=2; col < mcol-2; col++) +- cielab (rgb[d][row][col], lab[row][col]); +- for (f=dir[d & 3],row=3; row < mrow-3; row++) +- for (col=3; col < mcol-3; col++) { +- lix = &lab[row][col]; +- g = 2*lix[0][0] - lix[f][0] - lix[-f][0]; +- drv[d][row][col] = SQR(g) +- + SQR((2*lix[0][1] - lix[f][1] - lix[-f][1] + g*500/232)) +- + SQR((2*lix[0][2] - lix[f][2] - lix[-f][2] - g*500/580)); +- } +- } +- +-/* Build homogeneity maps from the derivatives: */ +- memset(homo, 0, ndir*TS*TS); +- for (row=4; row < mrow-4; row++) +- for (col=4; col < mcol-4; col++) { +- for (tr=FLT_MAX, d=0; d < ndir; d++) +- if (tr > drv[d][row][col]) +- tr = drv[d][row][col]; +- tr *= 8; +- for (d=0; d < ndir; d++) +- for (v=-1; v <= 1; v++) +- for (h=-1; h <= 1; h++) +- if (drv[d][row+v][col+h] <= tr) +- homo[d][row][col]++; +- } +- +-/* Average the most homogenous pixels for the final result: */ +- if (height-top < TS+4) mrow = height-top+2; +- if (width-left < TS+4) mcol = width-left+2; +- for (row = MIN(top,8); row < mrow-8; row++) +- for (col = MIN(left,8); col < mcol-8; col++) { +- for (d=0; d < ndir; d++) +- for (hm[d]=0, v=-2; v <= 2; v++) +- for (h=-2; h <= 2; h++) +- hm[d] += homo[d][row+v][col+h]; +- for (d=0; d < ndir-4; d++) +- if (hm[d] < hm[d+4]) hm[d ] = 0; else +- if (hm[d] > hm[d+4]) hm[d+4] = 0; +- for (max=hm[0],d=1; d < ndir; d++) +- if (max < hm[d]) max = hm[d]; +- max -= max >> 3; +- memset (avg, 0, sizeof avg); +- for (d=0; d < ndir; d++) +- if (hm[d] >= max) { +- FORC3 avg[c] += rgb[d][row][col][c]; +- avg[3]++; +- } +- FORC3 image[(row+top)*width+col+left][c] = avg[c]/avg[3]; +- } +- } +- free(buffer); +- border_interpolate(8); +-} +-#undef fcol +- -/* - Adaptive Homogeneity-Directed interpolation is based on - the work of Keigo Hirakawa, Thomas Parks, and Paul Lee. @@ -1103,7 +1818,7 @@ - - for (top=2; top < height-5; top += TS-6) - for (left=2; left < width-5; left += TS-6) { - +- -/* Interpolate green horizontally and vertically: */ - for (row=top; row < top+TS && row < height-2; row++) { - col = left + (FC(row,left) & 1); @@ -1184,9 +1899,587 @@ - } - free (buffer); -} - #undef TS +-#undef TS +- +-void CLASS median_filter() +-{ +- ushort (*pix)[4]; +- int pass, c, i, j, k, med[9]; +- static const uchar opt[] = /* Optimal 9-element median search */ +- { 1,2, 4,5, 7,8, 0,1, 3,4, 6,7, 1,2, 4,5, 7,8, +- 0,3, 5,8, 4,7, 3,6, 1,4, 2,5, 4,7, 4,2, 6,4, 4,2 }; +- +- for (pass=1; pass <= med_passes; pass++) { +- if (verbose) +- fprintf (stderr,_("Median filter pass %d...\n"), pass); +- for (c=0; c < 3; c+=2) { +- for (pix = image; pix < image+width*height; pix++) +- pix[0][3] = pix[0][c]; +- for (pix = image+width; pix < image+width*(height-1); pix++) { +- if ((pix-image+1) % width < 2) continue; +- for (k=0, i = -width; i <= width; i += width) +- for (j = i-1; j <= i+1; j++) +- med[k++] = pix[j][3] - pix[j][1]; +- for (i=0; i < sizeof opt; i+=2) +- if (med[opt[i]] > med[opt[i+1]]) +- SWAP (med[opt[i]] , med[opt[i+1]]); +- pix[0][c] = CLIP(med[4] + pix[0][1]); +- } +- } +- } +-} +- +-void CLASS blend_highlights() +-{ +- int clip=INT_MAX, row, col, c, i, j; +- static const float trans[2][4][4] = +- { { { 1,1,1 }, { 1.7320508,-1.7320508,0 }, { -1,-1,2 } }, +- { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; +- static const float itrans[2][4][4] = +- { { { 1,0.8660254,-0.5 }, { 1,-0.8660254,-0.5 }, { 1,0,1 } }, +- { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; +- float cam[2][4], lab[2][4], sum[2], chratio; +- +- if ((unsigned) (colors-3) > 1) return; +- if (verbose) fprintf (stderr,_("Blending highlights...\n")); +- FORCC if (clip > (i = 65535*pre_mul[c])) clip = i; +- for (row=0; row < height; row++) +- for (col=0; col < width; col++) { +- FORCC if (image[row*width+col][c] > clip) break; +- if (c == colors) continue; +- FORCC { +- cam[0][c] = image[row*width+col][c]; +- cam[1][c] = MIN(cam[0][c],clip); +- } +- for (i=0; i < 2; i++) { +- FORCC for (lab[i][c]=j=0; j < colors; j++) +- lab[i][c] += trans[colors-3][c][j] * cam[i][j]; +- for (sum[i]=0,c=1; c < colors; c++) +- sum[i] += SQR(lab[i][c]); +- } +- chratio = sqrt(sum[1]/sum[0]); +- for (c=1; c < colors; c++) +- lab[0][c] *= chratio; +- FORCC for (cam[0][c]=j=0; j < colors; j++) +- cam[0][c] += itrans[colors-3][c][j] * lab[0][j]; +- FORCC image[row*width+col][c] = cam[0][c] / colors; +- } +-} +- +-#define SCALE (4 >> shrink) +-void CLASS recover_highlights() +-{ +- float *map, sum, wgt, grow; +- int hsat[4], count, spread, change, val, i; +- unsigned high, wide, mrow, mcol, row, col, kc, c, d, y, x; +- ushort *pixel; +- static const signed char dir[8][2] = +- { {-1,-1}, {-1,0}, {-1,1}, {0,1}, {1,1}, {1,0}, {1,-1}, {0,-1} }; +- +- if (verbose) fprintf (stderr,_("Rebuilding highlights...\n")); +- +- grow = pow (2, 4-highlight); +- FORCC hsat[c] = 32000 * pre_mul[c]; +- for (kc=0, c=1; c < colors; c++) +- if (pre_mul[kc] < pre_mul[c]) kc = c; +- high = height / SCALE; +- wide = width / SCALE; +- map = (float *) calloc (high, wide*sizeof *map); +- merror (map, "recover_highlights()"); +- FORCC if (c != kc) { +- memset (map, 0, high*wide*sizeof *map); +- for (mrow=0; mrow < high; mrow++) +- for (mcol=0; mcol < wide; mcol++) { +- sum = wgt = count = 0; +- for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) +- for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { +- pixel = image[row*width+col]; +- if (pixel[c] / hsat[c] == 1 && pixel[kc] > 24000) { +- sum += pixel[c]; +- wgt += pixel[kc]; +- count++; +- } +- } +- if (count == SCALE*SCALE) +- map[mrow*wide+mcol] = sum / wgt; +- } +- for (spread = 32/grow; spread--; ) { +- for (mrow=0; mrow < high; mrow++) +- for (mcol=0; mcol < wide; mcol++) { +- if (map[mrow*wide+mcol]) continue; +- sum = count = 0; +- for (d=0; d < 8; d++) { +- y = mrow + dir[d][0]; +- x = mcol + dir[d][1]; +- if (y < high && x < wide && map[y*wide+x] > 0) { +- sum += (1 + (d & 1)) * map[y*wide+x]; +- count += 1 + (d & 1); +- } +- } +- if (count > 3) +- map[mrow*wide+mcol] = - (sum+grow) / (count+grow); +- } +- for (change=i=0; i < high*wide; i++) +- if (map[i] < 0) { +- map[i] = -map[i]; +- change = 1; +- } +- if (!change) break; +- } +- for (i=0; i < high*wide; i++) +- if (map[i] == 0) map[i] = 1; +- for (mrow=0; mrow < high; mrow++) +- for (mcol=0; mcol < wide; mcol++) { +- for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) +- for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { +- pixel = image[row*width+col]; +- if (pixel[c] / hsat[c] > 1) { +- val = pixel[kc] * map[mrow*wide+mcol]; +- if (pixel[c] < val) pixel[c] = CLIP(val); +- } +- } +- } +- } +- free (map); +-} +-#undef SCALE ++//void CLASS border_interpolate (int border) ++//{ ++// unsigned row, col, y, x, f, c, sum[8]; ++// ++// for (row=0; row < height; row++) ++// for (col=0; col < width; col++) { ++// if (col==border && row >= border && row < height-border) ++// col = width-border; ++// memset (sum, 0, sizeof sum); ++// for (y=row-1; y != row+2; y++) ++// for (x=col-1; x != col+2; x++) ++// if (y < height && x < width) { ++// f = fcol(y,x); ++// sum[f] += image[y*width+x][f]; ++// sum[f+4]++; ++// } ++// f = fcol(row,col); ++// FORCC if (c != f && sum[c+4]) ++// image[row*width+col][c] = sum[c] / sum[c+4]; ++// } ++//} ++ ++/* RT: delete interpolation functions */ ++ ++ ++//void CLASS cielab (ushort rgb[3], short lab[3]) ++//{ ++// int c, i, j, k; ++// float r, xyz[3]; ++// static float cbrt[0x10000], xyz_cam[3][4]; ++// ++// if (!rgb) { ++// for (i=0; i < 0x10000; i++) { ++// r = i / 65535.0; ++// cbrt[i] = r > 0.008856 ? pow(r,1/3.0) : 7.787*r + 16/116.0; ++// } ++// for (i=0; i < 3; i++) ++// for (j=0; j < colors; j++) ++// for (xyz_cam[i][j] = k=0; k < 3; k++) ++// xyz_cam[i][j] += xyz_rgb[i][k] * rgb_cam[k][j] / d65_white[i]; ++// return; ++// } ++// xyz[0] = xyz[1] = xyz[2] = 0.5; ++// FORCC { ++// xyz[0] += xyz_cam[0][c] * rgb[c]; ++// xyz[1] += xyz_cam[1][c] * rgb[c]; ++// xyz[2] += xyz_cam[2][c] * rgb[c]; ++// } ++// xyz[0] = cbrt[CLIP((int) xyz[0])]; ++// xyz[1] = cbrt[CLIP((int) xyz[1])]; ++// xyz[2] = cbrt[CLIP((int) xyz[2])]; ++// lab[0] = 64 * (116 * xyz[1] - 16); ++// lab[1] = 64 * 500 * (xyz[0] - xyz[1]); ++// lab[2] = 64 * 200 * (xyz[1] - xyz[2]); ++//} ++// ++//#define TS 512 /* Tile Size */ ++//#define fcol(row,col) xtrans[(row+6) % 6][(col+6) % 6] ++// ++///* ++// Frank Markesteijn's algorithm for Fuji X-Trans sensors ++// */ ++//void CLASS xtrans_interpolate (int passes) ++//{ ++// int c, d, f, g, h, i, v, ng, row, col, top, left, mrow, mcol; ++// int val, ndir, pass, hm[8], avg[4], color[3][8]; ++// static const short orth[12] = { 1,0,0,1,-1,0,0,-1,1,0,0,1 }, ++// patt[2][16] = { { 0,1,0,-1,2,0,-1,0,1,1,1,-1,0,0,0,0 }, ++// { 0,1,0,-2,1,0,-2,0,1,1,-2,-2,1,-1,-1,1 } }, ++// dir[4] = { 1,TS,TS+1,TS-1 }; ++// short allhex[3][3][2][8], *hex; ++// ushort min, max, sgrow, sgcol; ++// ushort (*rgb)[TS][TS][3], (*rix)[3], (*pix)[4]; ++// short (*lab) [TS][3], (*lix)[3]; ++// float (*drv)[TS][TS], diff[6], tr; ++// char (*homo)[TS][TS], *buffer; ++// ++// if (verbose) ++// fprintf (stderr,_("%d-pass X-Trans interpolation...\n"), passes); ++// ++// cielab (0,0); ++// ndir = 4 << (passes > 1); ++// buffer = (char *) malloc (TS*TS*(ndir*11+6)); ++// merror (buffer, "xtrans_interpolate()"); ++// rgb = (ushort(*)[TS][TS][3]) buffer; ++// lab = (short (*) [TS][3])(buffer + TS*TS*(ndir*6)); ++// drv = (float (*)[TS][TS]) (buffer + TS*TS*(ndir*6+6)); ++// homo = (char (*)[TS][TS]) (buffer + TS*TS*(ndir*10+6)); ++// ++///* Map a green hexagon around each non-green pixel and vice versa: */ ++// for (row=0; row < 3; row++) ++// for (col=0; col < 3; col++) ++// for (ng=d=0; d < 10; d+=2) { ++// g = fcol(row,col) == 1; ++// if (fcol(row+orth[d],col+orth[d+2]) == 1) ng=0; else ng++; ++// if (ng == 4) { sgrow = row; sgcol = col; } ++// if (ng == g+1) FORC(8) { ++// v = orth[d ]*patt[g][c*2] + orth[d+1]*patt[g][c*2+1]; ++// h = orth[d+2]*patt[g][c*2] + orth[d+3]*patt[g][c*2+1]; ++// allhex[row][col][0][c^(g*2 & d)] = h + v*width; ++// allhex[row][col][1][c^(g*2 & d)] = h + v*TS; ++// } ++// } ++// ++///* Set green1 and green3 to the minimum and maximum allowed values: */ ++// for (row=2; row < height-2; row++) ++// for (min=~(max=0), col=2; col < width-2; col++) { ++// if (fcol(row,col) == 1 && (min=~(max=0))) continue; ++// pix = image + row*width + col; ++// hex = allhex[row % 3][col % 3][0]; ++// if (!max) FORC(6) { ++// val = pix[hex[c]][1]; ++// if (min > val) min = val; ++// if (max < val) max = val; ++// } ++// pix[0][1] = min; ++// pix[0][3] = max; ++// switch ((row-sgrow) % 3) { ++// case 1: if (row < height-3) { row++; col--; } break; ++// case 2: if ((min=~(max=0)) && (col+=2) < width-3 && row > 2) row--; ++// } ++// } ++// ++// for (top=3; top < height-19; top += TS-16) ++// for (left=3; left < width-19; left += TS-16) { ++// mrow = MIN (top+TS, height-3); ++// mcol = MIN (left+TS, width-3); ++// for (row=top; row < mrow; row++) ++// for (col=left; col < mcol; col++) ++// memcpy (rgb[0][row-top][col-left], image[row*width+col], 6); ++// FORC3 memcpy (rgb[c+1], rgb[0], sizeof *rgb); ++// ++///* Interpolate green horizontally, vertically, and along both diagonals: */ ++// for (row=top; row < mrow; row++) ++// for (col=left; col < mcol; col++) { ++// if ((f = fcol(row,col)) == 1) continue; ++// pix = image + row*width + col; ++// hex = allhex[row % 3][col % 3][0]; ++// color[1][0] = 174 * (pix[ hex[1]][1] + pix[ hex[0]][1]) - ++// 46 * (pix[2*hex[1]][1] + pix[2*hex[0]][1]); ++// color[1][1] = 223 * pix[ hex[3]][1] + pix[ hex[2]][1] * 33 + ++// 92 * (pix[ 0 ][f] - pix[ -hex[2]][f]); ++// FORC(2) color[1][2+c] = ++// 164 * pix[hex[4+c]][1] + 92 * pix[-2*hex[4+c]][1] + 33 * ++// (2*pix[0][f] - pix[3*hex[4+c]][f] - pix[-3*hex[4+c]][f]); ++// FORC4 rgb[c^!((row-sgrow) % 3)][row-top][col-left][1] = ++// LIM(color[1][c] >> 8,pix[0][1],pix[0][3]); ++// } ++// ++// for (pass=0; pass < passes; pass++) { ++// if (pass == 1) ++// memcpy (rgb+=4, buffer, 4*sizeof *rgb); ++// ++///* Recalculate green from interpolated values of closer pixels: */ ++// if (pass) { ++// for (row=top+2; row < mrow-2; row++) ++// for (col=left+2; col < mcol-2; col++) { ++// if ((f = fcol(row,col)) == 1) continue; ++// pix = image + row*width + col; ++// hex = allhex[row % 3][col % 3][1]; ++// for (d=3; d < 6; d++) { ++// rix = &rgb[(d-2)^!((row-sgrow) % 3)][row-top][col-left]; ++// val = rix[-2*hex[d]][1] + 2*rix[hex[d]][1] ++// - rix[-2*hex[d]][f] - 2*rix[hex[d]][f] + 3*rix[0][f]; ++// rix[0][1] = LIM(val/3,pix[0][1],pix[0][3]); ++// } ++// } ++// } ++// ++///* Interpolate red and blue values for solitary green pixels: */ ++// for (row=(top-sgrow+4)/3*3+sgrow; row < mrow-2; row+=3) ++// for (col=(left-sgcol+4)/3*3+sgcol; col < mcol-2; col+=3) { ++// rix = &rgb[0][row-top][col-left]; ++// h = fcol(row,col+1); ++// memset (diff, 0, sizeof diff); ++// for (i=1, d=0; d < 6; d++, i^=TS^1, h^=2) { ++// for (c=0; c < 2; c++, h^=2) { ++// g = 2*rix[0][1] - rix[i< 1) ++// diff[d] += SQR (rix[i< 1 && (d & 1)) ++// if (diff[d-1] < diff[d]) ++// FORC(2) color[c*2][d] = color[c*2][d-1]; ++// if (d < 2 || (d & 1)) { ++// FORC(2) rix[0][c*2] = CLIP(color[c*2][d]/2); ++// rix += TS*TS; ++// } ++// } ++// } ++// ++///* Interpolate red for blue pixels and vice versa: */ ++// for (row=top+3; row < mrow-3; row++) ++// for (col=left+3; col < mcol-3; col++) { ++// if ((f = 2-fcol(row,col)) == 1) continue; ++// rix = &rgb[0][row-top][col-left]; ++// c = (row-sgrow) % 3 ? TS:1; ++// h = 3 * (c ^ TS ^ 1); ++// for (d=0; d < 4; d++, rix += TS*TS) { ++// i = d > 1 || ((d ^ c) & 1) || ++// ((ABS(rix[0][1]-rix[c][1])+ABS(rix[0][1]-rix[-c][1])) < ++// 2*(ABS(rix[0][1]-rix[h][1])+ABS(rix[0][1]-rix[-h][1]))) ? c:h; ++// rix[0][f] = CLIP((rix[i][f] + rix[-i][f] + ++// 2*rix[0][1] - rix[i][1] - rix[-i][1])/2); ++// } ++// } ++// ++///* Fill in red and blue for 2x2 blocks of green: */ ++// for (row=top+2; row < mrow-2; row++) if ((row-sgrow) % 3) ++// for (col=left+2; col < mcol-2; col++) if ((col-sgcol) % 3) { ++// rix = &rgb[0][row-top][col-left]; ++// hex = allhex[row % 3][col % 3][1]; ++// for (d=0; d < ndir; d+=2, rix += TS*TS) ++// if (hex[d] + hex[d+1]) { ++// g = 3*rix[0][1] - 2*rix[hex[d]][1] - rix[hex[d+1]][1]; ++// for (c=0; c < 4; c+=2) rix[0][c] = ++// CLIP((g + 2*rix[hex[d]][c] + rix[hex[d+1]][c])/3); ++// } else { ++// g = 2*rix[0][1] - rix[hex[d]][1] - rix[hex[d+1]][1]; ++// for (c=0; c < 4; c+=2) rix[0][c] = ++// CLIP((g + rix[hex[d]][c] + rix[hex[d+1]][c])/2); ++// } ++// } ++// } ++// rgb = (ushort(*)[TS][TS][3]) buffer; ++// mrow -= top; ++// mcol -= left; ++// ++///* Convert to CIELab and differentiate in all directions: */ ++// for (d=0; d < ndir; d++) { ++// for (row=2; row < mrow-2; row++) ++// for (col=2; col < mcol-2; col++) ++// cielab (rgb[d][row][col], lab[row][col]); ++// for (f=dir[d & 3],row=3; row < mrow-3; row++) ++// for (col=3; col < mcol-3; col++) { ++// lix = &lab[row][col]; ++// g = 2*lix[0][0] - lix[f][0] - lix[-f][0]; ++// drv[d][row][col] = SQR(g) ++// + SQR((2*lix[0][1] - lix[f][1] - lix[-f][1] + g*500/232)) ++// + SQR((2*lix[0][2] - lix[f][2] - lix[-f][2] - g*500/580)); ++// } ++// } ++// ++///* Build homogeneity maps from the derivatives: */ ++// memset(homo, 0, ndir*TS*TS); ++// for (row=4; row < mrow-4; row++) ++// for (col=4; col < mcol-4; col++) { ++// for (tr=FLT_MAX, d=0; d < ndir; d++) ++// if (tr > drv[d][row][col]) ++// tr = drv[d][row][col]; ++// tr *= 8; ++// for (d=0; d < ndir; d++) ++// for (v=-1; v <= 1; v++) ++// for (h=-1; h <= 1; h++) ++// if (drv[d][row+v][col+h] <= tr) ++// homo[d][row][col]++; ++// } ++// ++///* Average the most homogenous pixels for the final result: */ ++// if (height-top < TS+4) mrow = height-top+2; ++// if (width-left < TS+4) mcol = width-left+2; ++// for (row = MIN(top,8); row < mrow-8; row++) ++// for (col = MIN(left,8); col < mcol-8; col++) { ++// for (d=0; d < ndir; d++) ++// for (hm[d]=0, v=-2; v <= 2; v++) ++// for (h=-2; h <= 2; h++) ++// hm[d] += homo[d][row+v][col+h]; ++// for (d=0; d < ndir-4; d++) ++// if (hm[d] < hm[d+4]) hm[d ] = 0; else ++// if (hm[d] > hm[d+4]) hm[d+4] = 0; ++// for (max=hm[0],d=1; d < ndir; d++) ++// if (max < hm[d]) max = hm[d]; ++// max -= max >> 3; ++// memset (avg, 0, sizeof avg); ++// for (d=0; d < ndir; d++) ++// if (hm[d] >= max) { ++// FORC3 avg[c] += rgb[d][row][col][c]; ++// avg[3]++; ++// } ++// FORC3 image[(row+top)*width+col+left][c] = avg[c]/avg[3]; ++// } ++// } ++// free(buffer); ++// border_interpolate(8); ++//} ++//#undef fcol ++// ++// ++//#undef TS ++ ++//void CLASS median_filter() ++//{ ++// ushort (*pix)[4]; ++// int pass, c, i, j, k, med[9]; ++// static const uchar opt[] = /* Optimal 9-element median search */ ++// { 1,2, 4,5, 7,8, 0,1, 3,4, 6,7, 1,2, 4,5, 7,8, ++// 0,3, 5,8, 4,7, 3,6, 1,4, 2,5, 4,7, 4,2, 6,4, 4,2 }; ++// ++// for (pass=1; pass <= med_passes; pass++) { ++// if (verbose) ++// fprintf (stderr,_("Median filter pass %d...\n"), pass); ++// for (c=0; c < 3; c+=2) { ++// for (pix = image; pix < image+width*height; pix++) ++// pix[0][3] = pix[0][c]; ++// for (pix = image+width; pix < image+width*(height-1); pix++) { ++// if ((pix-image+1) % width < 2) continue; ++// for (k=0, i = -width; i <= width; i += width) ++// for (j = i-1; j <= i+1; j++) ++// med[k++] = pix[j][3] - pix[j][1]; ++// for (i=0; i < sizeof opt; i+=2) ++// if (med[opt[i]] > med[opt[i+1]]) ++// SWAP (med[opt[i]] , med[opt[i+1]]); ++// pix[0][c] = CLIP(med[4] + pix[0][1]); ++// } ++// } ++// } ++//} ++// ++//void CLASS blend_highlights() ++//{ ++// int clip=INT_MAX, row, col, c, i, j; ++// static const float trans[2][4][4] = ++// { { { 1,1,1 }, { 1.7320508,-1.7320508,0 }, { -1,-1,2 } }, ++// { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; ++// static const float itrans[2][4][4] = ++// { { { 1,0.8660254,-0.5 }, { 1,-0.8660254,-0.5 }, { 1,0,1 } }, ++// { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; ++// float cam[2][4], lab[2][4], sum[2], chratio; ++// ++// if ((unsigned) (colors-3) > 1) return; ++// if (verbose) fprintf (stderr,_("Blending highlights...\n")); ++// FORCC if (clip > (i = 65535*pre_mul[c])) clip = i; ++// for (row=0; row < height; row++) ++// for (col=0; col < width; col++) { ++// FORCC if (image[row*width+col][c] > clip) break; ++// if (c == colors) continue; ++// FORCC { ++// cam[0][c] = image[row*width+col][c]; ++// cam[1][c] = MIN(cam[0][c],clip); ++// } ++// for (i=0; i < 2; i++) { ++// FORCC for (lab[i][c]=j=0; j < colors; j++) ++// lab[i][c] += trans[colors-3][c][j] * cam[i][j]; ++// for (sum[i]=0,c=1; c < colors; c++) ++// sum[i] += SQR(lab[i][c]); ++// } ++// chratio = sqrt(sum[1]/sum[0]); ++// for (c=1; c < colors; c++) ++// lab[0][c] *= chratio; ++// FORCC for (cam[0][c]=j=0; j < colors; j++) ++// cam[0][c] += itrans[colors-3][c][j] * lab[0][j]; ++// FORCC image[row*width+col][c] = cam[0][c] / colors; ++// } ++//} ++// ++//#define SCALE (4 >> shrink) ++//void CLASS recover_highlights() ++//{ ++// float *map, sum, wgt, grow; ++// int hsat[4], count, spread, change, val, i; ++// unsigned high, wide, mrow, mcol, row, col, kc, c, d, y, x; ++// ushort *pixel; ++// static const signed char dir[8][2] = ++// { {-1,-1}, {-1,0}, {-1,1}, {0,1}, {1,1}, {1,0}, {1,-1}, {0,-1} }; ++// ++// if (verbose) fprintf (stderr,_("Rebuilding highlights...\n")); ++// ++// grow = pow (2, 4-highlight); ++// FORCC hsat[c] = 32000 * pre_mul[c]; ++// for (kc=0, c=1; c < colors; c++) ++// if (pre_mul[kc] < pre_mul[c]) kc = c; ++// high = height / SCALE; ++// wide = width / SCALE; ++// map = (float *) calloc (high, wide*sizeof *map); ++// merror (map, "recover_highlights()"); ++// FORCC if (c != kc) { ++// memset (map, 0, high*wide*sizeof *map); ++// for (mrow=0; mrow < high; mrow++) ++// for (mcol=0; mcol < wide; mcol++) { ++// sum = wgt = count = 0; ++// for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) ++// for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { ++// pixel = image[row*width+col]; ++// if (pixel[c] / hsat[c] == 1 && pixel[kc] > 24000) { ++// sum += pixel[c]; ++// wgt += pixel[kc]; ++// count++; ++// } ++// } ++// if (count == SCALE*SCALE) ++// map[mrow*wide+mcol] = sum / wgt; ++// } ++// for (spread = 32/grow; spread--; ) { ++// for (mrow=0; mrow < high; mrow++) ++// for (mcol=0; mcol < wide; mcol++) { ++// if (map[mrow*wide+mcol]) continue; ++// sum = count = 0; ++// for (d=0; d < 8; d++) { ++// y = mrow + dir[d][0]; ++// x = mcol + dir[d][1]; ++// if (y < high && x < wide && map[y*wide+x] > 0) { ++// sum += (1 + (d & 1)) * map[y*wide+x]; ++// count += 1 + (d & 1); ++// } ++// } ++// if (count > 3) ++// map[mrow*wide+mcol] = - (sum+grow) / (count+grow); ++// } ++// for (change=i=0; i < high*wide; i++) ++// if (map[i] < 0) { ++// map[i] = -map[i]; ++// change = 1; ++// } ++// if (!change) break; ++// } ++// for (i=0; i < high*wide; i++) ++// if (map[i] == 0) map[i] = 1; ++// for (mrow=0; mrow < high; mrow++) ++// for (mcol=0; mcol < wide; mcol++) { ++// for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) ++// for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { ++// pixel = image[row*width+col]; ++// if (pixel[c] / hsat[c] > 1) { ++// val = pixel[kc] * map[mrow*wide+mcol]; ++// if (pixel[c] < val) pixel[c] = CLIP(val); ++// } ++// } ++// } ++// } ++// free (map); ++//} ++//#undef SCALE - void CLASS median_filter() + void CLASS tiff_get (unsigned base, + unsigned *tag, unsigned *type, unsigned *len, unsigned *save) @@ -5139,7 +5127,7 @@ } } @@ -1752,7 +3045,7 @@ } else if (!strcmp(model,"DSLR-A100")) { if (width == 3880) { height--; -@@ -9357,6 +9476,18 @@ +@@ -9357,6 +9476,20 @@ memcpy (rgb_cam, cmatrix, sizeof cmatrix); raw_color = 0; } @@ -1762,16 +3055,18 @@ + adobe_coeff (make, model); + if(!strncmp(make, "Samsung", 7) && !strncmp(model, "NX1",3)) + adobe_coeff (make, model); -+ if(!strncmp(make, "Pentax", 6) && !strncmp(model, "K10D",4)) ++ if(!strncmp(make, "Pentax", 6) && (!strncmp(model, "K10D",4) || !strncmp(model, "K-70",4))) + adobe_coeff (make, model); + if(!strncmp(make, "Leica", 5) && !strncmp(model, "Q",1)) + adobe_coeff (make, model); + if(!strncmp(make, "Leica", 5) && !strncmp(model, "SL",2)) + adobe_coeff (make, model); ++ if(!strncmp(make, "XIAOYI", 6) && !strncmp(model, "M1",2)) ++ adobe_coeff (make, model); if (raw_color) adobe_coeff (make, model); if (load_raw == &CLASS kodak_radc_load_raw) if (raw_color) adobe_coeff ("Apple","Quicktake"); -@@ -9371,9 +9502,9 @@ +@@ -9371,9 +9504,9 @@ if (raw_width < width ) raw_width = width; } if (!tiff_bps) tiff_bps = 12; @@ -1783,9 +3078,141 @@ is_raw = 0; #ifdef NO_JASPER if (load_raw == &CLASS redcine_load_raw) { -@@ -9452,199 +9583,250 @@ +@@ -9402,249 +9535,300 @@ + if (flip == UINT_MAX) flip = 0; } - #endif + +-#ifndef NO_LCMS +-void CLASS apply_profile (const char *input, const char *output) +-{ +- char *prof; +- cmsHPROFILE hInProfile=0, hOutProfile=0; +- cmsHTRANSFORM hTransform; +- FILE *fp; +- unsigned size; +- +- if (strcmp (input, "embed")) +- hInProfile = cmsOpenProfileFromFile (input, "r"); +- else if (profile_length) { +- prof = (char *) malloc (profile_length); +- merror (prof, "apply_profile()"); +- fseek (ifp, profile_offset, SEEK_SET); +- fread (prof, 1, profile_length, ifp); +- hInProfile = cmsOpenProfileFromMem (prof, profile_length); +- free (prof); +- } else +- fprintf (stderr,_("%s has no embedded profile.\n"), ifname); +- if (!hInProfile) return; +- if (!output) +- hOutProfile = cmsCreate_sRGBProfile(); +- else if ((fp = fopen (output, "rb"))) { +- fread (&size, 4, 1, fp); +- fseek (fp, 0, SEEK_SET); +- oprof = (unsigned *) malloc (size = ntohl(size)); +- merror (oprof, "apply_profile()"); +- fread (oprof, 1, size, fp); +- fclose (fp); +- if (!(hOutProfile = cmsOpenProfileFromMem (oprof, size))) { +- free (oprof); +- oprof = 0; ++//#ifndef NO_LCMS ++//void CLASS apply_profile (const char *input, const char *output) ++//{ ++// char *prof; ++// cmsHPROFILE hInProfile=0, hOutProfile=0; ++// cmsHTRANSFORM hTransform; ++// FILE *fp; ++// unsigned size; ++// ++// if (strcmp (input, "embed")) ++// hInProfile = cmsOpenProfileFromFile (input, "r"); ++// else if (profile_length) { ++// prof = (char *) malloc (profile_length); ++// merror (prof, "apply_profile()"); ++// fseek (ifp, profile_offset, SEEK_SET); ++// fread (prof, 1, profile_length, ifp); ++// hInProfile = cmsOpenProfileFromMem (prof, profile_length); ++// free (prof); ++// } else ++// fprintf (stderr,_("%s has no embedded profile.\n"), ifname); ++// if (!hInProfile) return; ++// if (!output) ++// hOutProfile = cmsCreate_sRGBProfile(); ++// else if ((fp = fopen (output, "rb"))) { ++// fread (&size, 4, 1, fp); ++// fseek (fp, 0, SEEK_SET); ++// oprof = (unsigned *) malloc (size = ntohl(size)); ++// merror (oprof, "apply_profile()"); ++// fread (oprof, 1, size, fp); ++// fclose (fp); ++// if (!(hOutProfile = cmsOpenProfileFromMem (oprof, size))) { ++// free (oprof); ++// oprof = 0; ++// } ++// } else ++// fprintf (stderr,_("Cannot open file %s!\n"), output); ++// if (!hOutProfile) goto quit; ++// if (verbose) ++// fprintf (stderr,_("Applying color profile...\n")); ++// hTransform = cmsCreateTransform (hInProfile, TYPE_RGBA_16, ++// hOutProfile, TYPE_RGBA_16, INTENT_PERCEPTUAL, 0); ++// cmsDoTransform (hTransform, image, image, width*height); ++// raw_color = 1; /* Don't use rgb_cam with a profile */ ++// cmsDeleteTransform (hTransform); ++// cmsCloseProfile (hOutProfile); ++//quit: ++// cmsCloseProfile (hInProfile); ++//} ++//#endif ++ ++/* RT: DNG Float */ ++ ++#include ++#include ++ ++static void decodeFPDeltaRow(Bytef * src, Bytef * dst, size_t tileWidth, size_t realTileWidth, int bytesps, int factor) { ++ // DecodeDeltaBytes ++ for (size_t col = factor; col < realTileWidth*bytesps; ++col) { ++ src[col] += src[col - factor]; ++ } ++ // Reorder bytes into the image ++ // 16 and 32-bit versions depend on local architecture, 24-bit does not ++ if (bytesps == 3) { ++ for (size_t col = 0; col < tileWidth; ++col) { ++ dst[col*3] = src[col]; ++ dst[col*3 + 1] = src[col + realTileWidth]; ++ dst[col*3 + 2] = src[col + realTileWidth*2]; + } +- } else +- fprintf (stderr,_("Cannot open file %s!\n"), output); +- if (!hOutProfile) goto quit; +- if (verbose) +- fprintf (stderr,_("Applying color profile...\n")); +- hTransform = cmsCreateTransform (hInProfile, TYPE_RGBA_16, +- hOutProfile, TYPE_RGBA_16, INTENT_PERCEPTUAL, 0); +- cmsDoTransform (hTransform, image, image, width*height); +- raw_color = 1; /* Don't use rgb_cam with a profile */ +- cmsDeleteTransform (hTransform); +- cmsCloseProfile (hOutProfile); +-quit: +- cmsCloseProfile (hInProfile); ++ } else { ++ union X { uint32_t x; uint8_t c; }; ++ if (((union X){1}).c) { ++ for (size_t col = 0; col < tileWidth; ++col) { ++ for (size_t byte = 0; byte < bytesps; ++byte) ++ dst[col*bytesps + byte] = src[col + realTileWidth*(bytesps-byte-1)]; // Little endian ++ } ++ } else { ++ for (size_t col = 0; col < tileWidth; ++col) { ++ for (size_t byte = 0; byte < bytesps; ++byte) ++ dst[col*bytesps + byte] = src[col + realTileWidth*byte]; ++ } ++ } ++ } ++ + } +-#endif -void CLASS convert_to_rgb() -{ @@ -1872,41 +3299,6 @@ - for (j=0; j < colors; j++) - for (out_cam[i][j] = k=0; k < 3; k++) - out_cam[i][j] += out_rgb[output_color-1][i][k] * rgb_cam[k][j]; -+/* RT: DNG Float */ -+ -+#include -+#include -+ -+static void decodeFPDeltaRow(Bytef * src, Bytef * dst, size_t tileWidth, size_t realTileWidth, int bytesps, int factor) { -+ // DecodeDeltaBytes -+ for (size_t col = factor; col < realTileWidth*bytesps; ++col) { -+ src[col] += src[col - factor]; -+ } -+ // Reorder bytes into the image -+ // 16 and 32-bit versions depend on local architecture, 24-bit does not -+ if (bytesps == 3) { -+ for (size_t col = 0; col < tileWidth; ++col) { -+ dst[col*3] = src[col]; -+ dst[col*3 + 1] = src[col + realTileWidth]; -+ dst[col*3 + 2] = src[col + realTileWidth*2]; -+ } -+ } else { -+ union X { uint32_t x; uint8_t c; }; -+ if (((union X){1}).c) { -+ for (size_t col = 0; col < tileWidth; ++col) { -+ for (size_t byte = 0; byte < bytesps; ++byte) -+ dst[col*bytesps + byte] = src[col + realTileWidth*(bytesps-byte-1)]; // Little endian -+ } -+ } else { -+ for (size_t col = 0; col < tileWidth; ++col) { -+ for (size_t byte = 0; byte < bytesps; ++byte) -+ dst[col*bytesps + byte] = src[col + realTileWidth*byte]; -+ } -+ } -+ } -+ -+} -+ +// From DNG SDK dng_utils.h +static inline uint32_t DNG_HalfToFloat(uint16_t halfValue) { + int32_t sign = (halfValue >> 15) & 0x00000001; @@ -2217,7 +3609,7 @@ struct tiff_tag { ushort tag, type; int count; -@@ -9667,594 +9849,11 @@ +@@ -9667,594 +9851,11 @@ char desc[512], make[64], model[64], soft[32], date[20], artist[64]; }; diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index 8f855ff0f..8ec850b0b 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -31,15 +31,15 @@ namespace rtengine extern const Settings* settings; Crop::Crop (ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool isDetailWindow) - : PipetteBuffer(editDataProvider), origCrop(NULL), spotCrop(NULL), laboCrop(NULL), labnCrop(NULL), - cropImg(NULL), cbuf_real(NULL), cshmap(NULL), transCrop(NULL), cieCrop(NULL), cbuffer(NULL), - updating(false), newUpdatePending(false), skip(10), + : PipetteBuffer(editDataProvider), origCrop(nullptr), spotCrop(nullptr), laboCrop(nullptr), labnCrop(nullptr), + cropImg(nullptr), cbuf_real(nullptr), cshmap(nullptr), transCrop(nullptr), cieCrop(nullptr), cbuffer(nullptr), + updating(false), newUpdatePending(false), skip(10), padding(0), cropx(0), cropy(0), cropw(-1), croph(-1), trafx(0), trafy(0), trafw(-1), trafh(-1), rqcropx(0), rqcropy(0), rqcropw(-1), rqcroph(-1), borderRequested(32), upperBorder(0), leftBorder(0), cropAllocated(false), - cropImageListener(NULL), parent(parent), isDetailWindow(isDetailWindow) + cropImageListener(nullptr), parent(parent), isDetailWindow(isDetailWindow) { parent->crops.push_back (this); } @@ -77,7 +77,7 @@ void Crop::setListener (DetailedCropListener* il) EditUniqueID Crop::getCurrEditID() { - EditSubscriber *subscriber = PipetteBuffer::dataProvider ? PipetteBuffer::dataProvider->getCurrSubscriber() : NULL; + EditSubscriber *subscriber = PipetteBuffer::dataProvider ? PipetteBuffer::dataProvider->getCurrSubscriber() : nullptr; return subscriber ? subscriber->getEditID() : EUID_None; } @@ -90,17 +90,17 @@ void Crop::setEditSubscriber(EditSubscriber* newSubscriber) MyMutex::MyLock lock(cropMutex); // At this point, editCrop.dataProvider->currSubscriber is the old subscriber - EditSubscriber *oldSubscriber = PipetteBuffer::dataProvider ? PipetteBuffer::dataProvider->getCurrSubscriber() : NULL; + EditSubscriber *oldSubscriber = PipetteBuffer::dataProvider ? PipetteBuffer::dataProvider->getCurrSubscriber() : nullptr; - if (newSubscriber == NULL || (oldSubscriber != NULL && oldSubscriber->getPipetteBufferType() != newSubscriber->getPipetteBufferType())) { - if (PipetteBuffer::imgFloatBuffer != NULL) { + if (newSubscriber == nullptr || (oldSubscriber != nullptr && oldSubscriber->getPipetteBufferType() != newSubscriber->getPipetteBufferType())) { + if (PipetteBuffer::imgFloatBuffer != nullptr) { delete PipetteBuffer::imgFloatBuffer; - PipetteBuffer::imgFloatBuffer = NULL; + PipetteBuffer::imgFloatBuffer = nullptr; } - if (PipetteBuffer::LabBuffer != NULL) { + if (PipetteBuffer::LabBuffer != nullptr) { delete PipetteBuffer::LabBuffer; - PipetteBuffer::LabBuffer = NULL; + PipetteBuffer::LabBuffer = nullptr; } if (PipetteBuffer::singlePlaneBuffer.getW() != -1) { @@ -164,7 +164,7 @@ void Crop::update (int todo) // printf("x=%d y=%d crow=%d croh=%d skip=%d\n",rqcropx, rqcropy, rqcropw, rqcroph, skip); // printf("trafx=%d trafyy=%d trafwsk=%d trafHs=%d \n",trafx, trafy, trafw*skip, trafh*skip); - Imagefloat *calclum = NULL;//for Luminance denoise curve + Imagefloat *calclum = nullptr;//for Luminance denoise curve NoiseCurve noiseLCurve; NoiseCurve noiseCCurve; float autoNR = (float) settings->nrauto;// @@ -321,7 +321,7 @@ void Crop::update (int todo) float maxr = 0.f; float maxb = 0.f; - float chaut, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, nresi, highresi, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc; + float chaut, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc; int Nb; chaut = 0.f; @@ -334,7 +334,7 @@ void Crop::update (int todo) LUTf gamcurve(65536, 0); float gam, gamthresh, gamslope; parent->ipf.RGB_denoise_infoGamCurve(params.dirpyrDenoise, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); - parent->ipf.RGB_denoise_info(baseCrop, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, nresi, highresi, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc, true); + parent->ipf.RGB_denoise_info(baseCrop, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc, true); // printf("redy=%f skin=%f pcskin=%f\n",redyel, skinc,nsknc); // printf("DCROP skip=%d cha=%4.0f Nb=%d red=%4.0f bl=%4.0f redM=%4.0f bluM=%4.0f L=%4.0f sigL=%4.0f Ch=%4.0f Si=%4.0f\n",skip, chaut,Nb, redaut,blueaut, maxredaut, maxblueaut, lumema, sigma_L, chromina, sigma); float multip = 1.f; @@ -453,9 +453,9 @@ void Crop::update (int todo) parent->imgsrc->convertColorSpace(provicalc, params.icm, parent->currWB);//for denoise luminance curve float pondcorrec = 1.0f; - float chaut = 0.f, redaut = 0.f, blueaut = 0.f, maxredaut = 0.f, maxblueaut = 0.f, minredaut = 0.f, minblueaut = 0.f, nresi = 0.f, highresi = 0.f, chromina = 0.f, sigma = 0.f, lumema = 0.f, sigma_L = 0.f, redyel = 0.f, skinc = 0.f, nsknc = 0.f; + float chaut = 0.f, redaut = 0.f, blueaut = 0.f, maxredaut = 0.f, maxblueaut = 0.f, minredaut = 0.f, minblueaut = 0.f, chromina = 0.f, sigma = 0.f, lumema = 0.f, sigma_L = 0.f, redyel = 0.f, skinc = 0.f, nsknc = 0.f; int nb = 0; - parent->ipf.RGB_denoise_info(origCropPart, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, nresi, highresi, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); + parent->ipf.RGB_denoise_info(origCropPart, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); //printf("DCROP skip=%d cha=%f red=%f bl=%f redM=%f bluM=%f chrom=%f sigm=%f lum=%f\n",skip, chaut,redaut,blueaut, maxredaut, maxblueaut, chromina, sigma, lumema); Nb[hcr * 3 + wcr] = nb; @@ -678,15 +678,17 @@ void Crop::update (int todo) createBuffer(cropw, croph); // transform - if (needstransform) { + if (needstransform || ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled)) { if (!transCrop) { transCrop = new Imagefloat (cropw, croph); } - if ((todo & M_TRANSFORM) && needstransform) + if (needstransform) parent->ipf.transform (baseCrop, transCrop, cropx / skip, cropy / skip, trafx / skip, trafy / skip, SKIPS(parent->fw, skip), SKIPS(parent->fh, skip), parent->getFullWidth(), parent->getFullHeight(), parent->imgsrc->getMetaData()->getFocalLen(), parent->imgsrc->getMetaData()->getFocalLen35mm(), parent->imgsrc->getMetaData()->getFocusDist(), parent->imgsrc->getRotateDegree(), false); + else + baseCrop->copyData(transCrop); if (transCrop) { baseCrop = transCrop; @@ -696,10 +698,10 @@ void Crop::update (int todo) delete transCrop; } - transCrop = NULL; + transCrop = nullptr; } - if ((todo & (M_TRANSFORM)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) { + if ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) { const int W = baseCrop->getWidth(); const int H = baseCrop->getHeight(); @@ -770,10 +772,11 @@ void Crop::update (int todo) DCPProfile::ApplyState as; DCPProfile *dcpProf = parent->imgsrc->getDCP(params.icm, parent->currWB, as); + LUTu histToneCurve; parent->ipf.rgbProc (baseCrop, laboCrop, this, parent->hltonecurve, parent->shtonecurve, parent->tonecurve, cshmap, params.toneCurve.saturation, parent->rCurve, parent->gCurve, parent->bCurve, parent->colourToningSatLimit , parent->colourToningSatLimitOpacity, parent->ctColorCurve, parent->ctOpacityCurve, parent->opautili, parent->clToningcurve, parent->cl2Toningcurve, parent->customToneCurve1, parent->customToneCurve2, parent->beforeToneCurveBW, parent->afterToneCurveBW, rrm, ggm, bbm, - parent->bwAutoR, parent->bwAutoG, parent->bwAutoB, dcpProf, as); + parent->bwAutoR, parent->bwAutoG, parent->bwAutoB, dcpProf, as, histToneCurve); } /*xref=000;yref=000; @@ -976,31 +979,21 @@ void Crop::update (int todo) delete cieCrop; } - cieCrop = NULL; + cieCrop = nullptr; } } // all pipette buffer processing should be finished now PipetteBuffer::setReady(); - // switch back to rgb + // Computing the preview image, i.e. converting from lab->Monitor color space (soft-proofing disabled) or lab->Output profile->Monitor color space (soft-proofing enabled) parent->ipf.lab2monitorRgb (labnCrop, cropImg); if (cropImageListener) { - // this in output space held in parallel to allow analysis like shadow/highlight - Glib::ustring outProfile = params.icm.output; - Glib::ustring workProfile = params.icm.working; - Image8 *cropImgtrue; + // Computing the internal image for analysis, i.e. conversion from lab->Output profile (rtSettings.HistogramWorking disabled) or lab->WCS (rtSettings.HistogramWorking enabled) - if(settings->HistogramWorking) { - cropImgtrue = parent->ipf.lab2rgb (labnCrop, 0, 0, cropw, croph, workProfile, RI_RELATIVE, false); // HOMBRE: was RELATIVE by default in lab2rgb, is it safe to assume we have to use it again ? - } else { - if (params.icm.output == "" || params.icm.output == ColorManagementParams::NoICMString) { - outProfile = "sRGB"; - } - - cropImgtrue = parent->ipf.lab2rgb (labnCrop, 0, 0, cropw, croph, outProfile, params.icm.outputIntent, false); - } + // internal image in output color space for analysis + Image8 *cropImgtrue = parent->ipf.lab2rgb (labnCrop, 0, 0, cropw, croph, params.icm); int finalW = rqcropw; @@ -1039,47 +1032,47 @@ void Crop::freeAll () if (cropAllocated) { if (origCrop ) { delete origCrop; - origCrop = NULL; + origCrop = nullptr; } if (transCrop) { delete transCrop; - transCrop = NULL; + transCrop = nullptr; } if (laboCrop ) { delete laboCrop; - laboCrop = NULL; + laboCrop = nullptr; } if (labnCrop ) { delete labnCrop; - labnCrop = NULL; + labnCrop = nullptr; } if (cropImg ) { delete cropImg; - cropImg = NULL; + cropImg = nullptr; } if (cieCrop ) { delete cieCrop; - cieCrop = NULL; + cieCrop = nullptr; } if (cbuf_real) { delete [] cbuf_real; - cbuf_real = NULL; + cbuf_real = nullptr; } if (cbuffer ) { delete [] cbuffer; - cbuffer = NULL; + cbuffer = nullptr; } if (cshmap ) { delete cshmap; - cshmap = NULL; + cshmap = nullptr; } PipetteBuffer::flush(); @@ -1138,11 +1131,9 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte ProcParams& params = parent->params; parent->ipf.transCoord (parent->fw, parent->fh, bx1, by1, bw, bh, orx, ory, orw, orh); - int tr = getCoarseBitMask(params.coarse); - PreviewProps cp (orx, ory, orw, orh, skip); int orW, orH; - parent->imgsrc->getSize (tr, cp, orW, orH); + parent->imgsrc->getSize (cp, orW, orH); int cw = SKIPS(bw, skip); int ch = SKIPS(bh, skip); @@ -1200,7 +1191,7 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte //cieCrop is only used in Crop::update, it is destroyed now but will be allocated on first use if (cieCrop) { delete cieCrop; - cieCrop = NULL; + cieCrop = nullptr; } if (cbuffer ) { @@ -1213,7 +1204,7 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte if (cshmap ) { delete cshmap; - cshmap = NULL; + cshmap = nullptr; } cbuffer = new float*[croph]; diff --git a/rtengine/dcrop.h b/rtengine/dcrop.h index 9b2c3dbaf..3739d4561 100644 --- a/rtengine/dcrop.h +++ b/rtengine/dcrop.h @@ -45,7 +45,7 @@ protected: Imagefloat* spotCrop; // "one chunk" allocation LabImage* laboCrop; // "one chunk" allocation LabImage* labnCrop; // "one chunk" allocation - Image8* cropImg; // "one chunk" allocation + Image8* cropImg; // "one chunk" allocation ; displayed image in monitor color space, showing the output profile as well (soft-proofing enabled, which then correspond to workimg) or not float * cbuf_real; // "one chunk" allocation SHMap* cshmap; // per line allocation diff --git a/rtengine/demosaic_algos.cc b/rtengine/demosaic_algos.cc index 405a34118..e641ed777 100644 --- a/rtengine/demosaic_algos.cc +++ b/rtengine/demosaic_algos.cc @@ -104,8 +104,8 @@ void RawImageSource::eahd_demosaic () interpolate_row_g (gh[0], gv[0], 0); interpolate_row_g (gh[1], gv[1], 1); interpolate_row_g (gh[2], gv[2], 2); - interpolate_row_rb (rh[0], bh[0], NULL, gh[0], gh[1], 0); - interpolate_row_rb (rv[0], bv[0], NULL, gv[0], gv[1], 0); + interpolate_row_rb (rh[0], bh[0], nullptr, gh[0], gh[1], 0); + interpolate_row_rb (rv[0], bv[0], nullptr, gv[0], gv[1], 0); interpolate_row_rb (rh[1], bh[1], gh[0], gh[1], gh[2], 1); interpolate_row_rb (rv[1], bv[1], gv[0], gv[1], gv[2], 1); @@ -138,8 +138,8 @@ void RawImageSource::eahd_demosaic () interpolate_row_rb (rh[(i + 1) % 3], bh[(i + 1) % 3], gh[i % 4], gh[(i + 1) % 4], gh[(i + 2) % 4], i + 1); interpolate_row_rb (rv[(i + 1) % 3], bv[(i + 1) % 3], gv[i % 4], gv[(i + 1) % 4], gv[(i + 2) % 4], i + 1); } else { - interpolate_row_rb (rh[(i + 1) % 3], bh[(i + 1) % 3], gh[i % 4], gh[(i + 1) % 4], NULL, i + 1); - interpolate_row_rb (rv[(i + 1) % 3], bv[(i + 1) % 3], gv[i % 4], gv[(i + 1) % 4], NULL, i + 1); + interpolate_row_rb (rh[(i + 1) % 3], bh[(i + 1) % 3], gh[i % 4], gh[(i + 1) % 4], nullptr, i + 1); + interpolate_row_rb (rv[(i + 1) % 3], bv[(i + 1) % 3], gv[i % 4], gv[(i + 1) % 4], nullptr, i + 1); } convert_to_cielab_row (rh[(i + 1) % 3], gh[(i + 1) % 4], bh[(i + 1) % 3], lLh[(i + 1) % 3], lah[(i + 1) % 3], lbh[(i + 1) % 3]); @@ -285,9 +285,9 @@ void RawImageSource::eahd_demosaic () // Interpolate R and B for (int i = 0; i < H; i++) { if (i == 0) { - interpolate_row_rb_mul_pp (red[i], blue[i], NULL, green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); + interpolate_row_rb_mul_pp (red[i], blue[i], nullptr, green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); } else if (i == H - 1) { - interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], NULL, i, 1.0, 1.0, 1.0, 0, W, 1); + interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], nullptr, i, 1.0, 1.0, 1.0, 0, W, 1); } else { interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); } @@ -521,10 +521,6 @@ void RawImageSource::hphd_demosaic () plistener->setProgress (0.33); } - for (int i = 0; i < H; i++) { - memset(hpmap[i], 0, W * sizeof(char)); - } - #ifdef _OPENMP #pragma omp parallel { @@ -550,9 +546,9 @@ void RawImageSource::hphd_demosaic () for (int i = 0; i < H; i++) { if (i == 0) { - interpolate_row_rb_mul_pp (red[i], blue[i], NULL, green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); + interpolate_row_rb_mul_pp (red[i], blue[i], nullptr, green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); } else if (i == H - 1) { - interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], NULL, i, 1.0, 1.0, 1.0, 0, W, 1); + interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], nullptr, i, 1.0, 1.0, 1.0, 0, W, 1); } else { interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); } @@ -861,9 +857,9 @@ void RawImageSource::vng4_demosaic () // rm, gm, bm must be recovered //interpolate_row_rb_mul_pp (red, blue, NULL, green[i], green[i+1], i, rm, gm, bm, 0, W, 1); { - interpolate_row_rb_mul_pp (red[i], blue[i], NULL, green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); + interpolate_row_rb_mul_pp (red[i], blue[i], nullptr, green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); } else if (i == H - 1) { - interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], NULL, i, 1.0, 1.0, 1.0, 0, W, 1); + interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], nullptr, i, 1.0, 1.0, 1.0, 0, W, 1); } else { interpolate_row_rb_mul_pp (red[i], blue[i], green[i - 1], green[i], green[i + 1], i, 1.0, 1.0, 1.0, 0, W, 1); } @@ -1368,7 +1364,7 @@ SSEFUNCTION void RawImageSource::lmmse_interpolate_omp(int winw, int winh, int i float *qix[5]; float *buffer = (float *)calloc(rr1 * cc1 * 5 * sizeof(float), 1); - if(buffer == NULL) { // allocation of big block of memory failed, try to get 5 smaller ones + if(buffer == nullptr) { // allocation of big block of memory failed, try to get 5 smaller ones printf("lmmse_interpolate_omp: allocation of big memory block failed, try to get 5 smaller ones now...\n"); bool allocationFailed = false; @@ -4047,7 +4043,7 @@ void RawImageSource::xtrans_interpolate (const int passes, const bool useCieLab) double progressInc = 36.0 * (1.0 - progress) / ((H * W) / ((ts - 16) * (ts - 16))); const int ndir = 4 << (passes > 1); - cielab (0, 0, 0, 0, 0, 0, 0, 0); + cielab (nullptr, nullptr, nullptr, nullptr, 0, 0, 0, nullptr); struct s_minmaxgreen { float min; float max; diff --git a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc index e06ac27e2..728d40d53 100644 --- a/rtengine/dfmanager.cc +++ b/rtengine/dfmanager.cc @@ -36,16 +36,18 @@ extern const Settings* settings; inline dfInfo& dfInfo::operator =(const dfInfo &o) { - pathname = o.pathname; - maker = o.maker; - model = o.model; - iso = o.iso; - shutter = o.shutter; - timestamp = o.timestamp; + if (this != &o) { + pathname = o.pathname; + maker = o.maker; + model = o.model; + iso = o.iso; + shutter = o.shutter; + timestamp = o.timestamp; - if( ri ) { - delete ri; - ri = NULL; + if( ri ) { + delete ri; + ri = nullptr; + } } return *this; @@ -138,7 +140,7 @@ void dfInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { int H = ri->get_height(); int W = ri->get_width(); @@ -200,7 +202,7 @@ void dfInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { ri->compress_image(); } @@ -332,11 +334,11 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto file = Gio::File::create_for_path (filename); if (!file) { - return 0; + return nullptr; } if (!file->query_exists ()) { - return 0; + return nullptr; } try { @@ -344,11 +346,11 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto info = file->query_info (); if (!info && info->get_file_type () == Gio::FILE_TYPE_DIRECTORY) { - return 0; + return nullptr; } if (!options.fbShowHidden && info->is_hidden ()) { - return 0; + return nullptr; } Glib::ustring ext; @@ -359,14 +361,14 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) } if (!options.is_extention_enabled (ext)) { - return 0; + return nullptr; } RawImage ri (filename); int res = ri.loadRaw (false); // Read informations about shot if (res != 0) { - return 0; + return nullptr; } dfList_t::iterator iter; @@ -406,7 +408,7 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool) } catch(Gio::Error&) {} - return 0; + return nullptr; } void DFManager::getStat( int &totFiles, int &totTemplates) @@ -433,7 +435,7 @@ void DFManager::getStat( int &totFiles, int &totTemplates) dfInfo* DFManager::find( const std::string &mak, const std::string &mod, int isospeed, double shut, time_t t ) { if( dfList.empty() ) { - return 0; + return nullptr; } std::string key( dfInfo::key(mak, mod, isospeed, shut) ); @@ -467,7 +469,7 @@ dfInfo* DFManager::find( const std::string &mak, const std::string &mod, int iso } } - return bestD != INFINITY ? &(bestMatch->second) : 0 ; + return bestD != INFINITY ? &(bestMatch->second) : nullptr ; } } @@ -478,7 +480,7 @@ RawImage* DFManager::searchDarkFrame( const std::string &mak, const std::string if( df ) { return df->getRawImage(); } else { - return 0; + return nullptr; } } @@ -496,7 +498,7 @@ RawImage* DFManager::searchDarkFrame( const Glib::ustring filename ) return df->getRawImage(); } - return 0; + return nullptr; } std::vector *DFManager::getHotPixels ( const Glib::ustring filename ) { @@ -506,7 +508,7 @@ std::vector *DFManager::getHotPixels ( const Glib::ustring filename ) } } - return 0; + return nullptr; } std::vector *DFManager::getHotPixels ( const std::string &mak, const std::string &mod, int iso, double shut, time_t t ) { @@ -525,7 +527,7 @@ std::vector *DFManager::getHotPixels ( const std::string &mak, const std return &df->getHotPixels(); } else { - return 0; + return nullptr; } } @@ -596,12 +598,13 @@ std::vector *DFManager::getBadPixels ( const std::string &mak, const std found = true; } - if( settings->verbose ) + if( settings->verbose ) { if(found) { printf("%s.badpixels found\n", s.str().c_str()); } else { printf("%s.badpixels not found\n", s.str().c_str()); } + } } @@ -615,16 +618,17 @@ std::vector *DFManager::getBadPixels ( const std::string &mak, const std found = true; } - if( settings->verbose ) + if( settings->verbose ) { if(found) { printf("%s.badpixels found\n", s.str().c_str()); } else { printf("%s.badpixels not found\n", s.str().c_str()); } + } } if(!found) { - return 0; + return nullptr; } else { return &(iter->second); } diff --git a/rtengine/dfmanager.h b/rtengine/dfmanager.h index befe67f5a..1cc22723b 100644 --- a/rtengine/dfmanager.h +++ b/rtengine/dfmanager.h @@ -39,10 +39,10 @@ public: dfInfo(const Glib::ustring &name, const std::string &mak, const std::string &mod, int iso, double shut, time_t t) - : pathname(name), maker(mak), model(mod), iso(iso), shutter(shut), timestamp(t), ri(NULL) {} + : pathname(name), maker(mak), model(mod), iso(iso), shutter(shut), timestamp(t), ri(nullptr) {} dfInfo( const dfInfo &o) - : pathname(o.pathname), maker(o.maker), model(o.model), iso(o.iso), shutter(o.shutter), timestamp(o.timestamp), ri(NULL) {} + : pathname(o.pathname), maker(o.maker), model(o.model), iso(o.iso), shutter(o.shutter), timestamp(o.timestamp), ri(nullptr) {} ~dfInfo() { if( ri ) { diff --git a/rtengine/diagonalcurves.cc b/rtengine/diagonalcurves.cc index a5505391e..2178e3dac 100644 --- a/rtengine/diagonalcurves.cc +++ b/rtengine/diagonalcurves.cc @@ -245,7 +245,7 @@ void DiagonalCurve::NURBS_set () printf("sc_length[%zu/3]=%f \n", it, sc_length[it / 3]); } - printf("NURBS diagonal curve: error detected!\n i=%d nbr_points=%d ppn=%d N=%d sc_length[i/3]=%f total_length=%f", i, nbr_points, ppn, N, sc_length[i / 3], total_length); + printf("NURBS diagonal curve: error detected!\n i=%u nbr_points=%d ppn=%d N=%d sc_length[i/3]=%f total_length=%f", i, nbr_points, ppn, N, sc_length[i / 3], total_length); exit(0); } diff --git a/rtengine/dirpyrLab_equalizer.cc b/rtengine/dirpyrLab_equalizer.cc deleted file mode 100644 index fc5fc70a0..000000000 --- a/rtengine/dirpyrLab_equalizer.cc +++ /dev/null @@ -1,521 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RawTherapee. If not, see . - * - * (C) 2010 Emil Martinec - * - */ - -#include -#include -#include "curves.h" -#include "labimage.h" -#include "improcfun.h" -#include "rawimagesource.h" -#include "rt_math.h" - -#ifdef _OPENMP -#include -#endif - -#define CLIPC(a) ((a)>-32000?((a)<32000?(a):32000):-32000) - -#define DIRWT(i1,j1,i,j) (rangefn[abs((int)data_fine->L[i1][j1]-data_fine->L[i][j])+abs((int)data_fine->a[i1][j1]-data_fine->a[i][j])+abs((int)data_fine->b[i1][j1]-data_fine->b[i][j])] ) - -namespace rtengine -{ - -static const int maxlevel = 4; - -//sequence of scales -static const int scales[8] = {1, 2, 4, 8, 16, 32, 64, 128}; -//sequence of pitches -static const int pitches[8] = {1, 1, 1, 1, 1, 1, 1, 1}; - -//sequence of scales -//static const int scales[8] = {1,1,1,1,1,1,1,1}; -//sequence of pitches -//static const int pitches[8] = {2,2,2,2,2,2,2,2}; - -//sequence of scales -//static const int scales[8] = {1,3,6,10,15,21,28,36}; -//sequence of pitches -//static const int pitches[8] = {1,1,1,1,1,1,1,1}; - -//sequence of scales -//static const int scales[8] = {1,1,2,4,8,16,32,64}; -//sequence of pitches -//static const int pitches[8] = {2,1,1,1,1,1,1,1}; - -//pitch is spacing of subsampling -//scale is spacing of directional averaging weights -//example 1: no subsampling at any level -- pitch=1, scale=2^n -//example 2: subsampling by 2 every level -- pitch=2, scale=1 at each level -//example 3: no subsampling at first level, subsampling by 2 thereafter -- -// pitch =1, scale=1 at first level; pitch=2, scale=2 thereafter - - - - -void ImProcFunctions :: dirpyrLab_equalizer(LabImage * src, LabImage * dst, /*float luma, float chroma, float gamma*/ const double * mult ) -{ - - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - LUTf rangefn(0x20000); - - - //set up weights - float noise = 1500; - - - //set up range functions - - for (int i = 0; i < 0x20000; i++) { - rangefn[i] = (int)((noise / ((double)i + noise))); - } - - - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - - - int level; - int ** buffer[3]; - - - LabImage * dirpyrLablo[maxlevel]; - - int w = src->W; - int h = src->H; - - buffer[0] = allocArray (w + 128, h + 128); - buffer[1] = allocArray (w + 128, h + 128); - buffer[2] = allocArray (w + 128, h + 128); - - for (int i = 0; i < h + 128; i++) - for (int j = 0; j < w + 128; j++) { - for (int c = 0; c < 3; c++) { - buffer[c][i][j] = 0; - } - } - - w = (int)((w - 1) / pitches[0]) + 1; - h = (int)((h - 1) / pitches[0]) + 1; - - dirpyrLablo[0] = new LabImage(w, h); - - for (level = 1; level < maxlevel; level++) { - w = (int)((w - 1) / pitches[level]) + 1; - h = (int)((h - 1) / pitches[level]) + 1; - dirpyrLablo[level] = new LabImage(w, h); - }; - - ////////////////////////////////////////////////////////////////////////////// - - - // c[0] = luma = noise_L - // c[1] = chroma = noise_ab - // c[2] decrease of noise var with scale - // c[3] radius of domain blur at each level - // c[4] shadow smoothing - // c[5] edge preservation - - level = 0; - - int scale = scales[level]; - - int pitch = pitches[level]; - - //int thresh = 10 * c[8]; - //impulse_nr (src, src, m_w1, m_h1, thresh, noisevar); - - dirpyr_eq(src, dirpyrLablo[0], rangefn, 0, pitch, scale, mult ); - - level = 1; - - int totalpitch = pitches[0]; - - while(level < maxlevel) { - scale = scales[level]; - pitch = pitches[level]; - - dirpyr_eq(dirpyrLablo[level - 1], dirpyrLablo[level], rangefn, level, pitch, scale, mult ); - - level ++; - totalpitch *= pitch; - } - - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - //initiate buffer for final image - for(int i = 0, i1 = 0; i < src->H; i += totalpitch, i1++) - for(int j = 0, j1 = 0; j < src->W; j += totalpitch, j1++) { - - //copy pixels - buffer[0][i][j] = dirpyrLablo[maxlevel - 1]->L[i1][j1]; - buffer[1][i][j] = dirpyrLablo[maxlevel - 1]->a[i1][j1]; - buffer[2][i][j] = dirpyrLablo[maxlevel - 1]->b[i1][j1]; - - } - - //if we are not subsampling, this is lots faster but does the typecasting work??? - //memcpy(buffer[0],dirpyrLablo[maxlevel-1]->L,sizeof(buffer[0])); - //memcpy(buffer[1],dirpyrLablo[maxlevel-1]->a,sizeof(buffer[1])); - //memcpy(buffer[2],dirpyrLablo[maxlevel-1]->b,sizeof(buffer[2])); - - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - - - for(int level = maxlevel - 1; level > 0; level--) { - - //int scale = scales[level]; - int pitch = pitches[level]; - - totalpitch /= pitch; - - idirpyr_eq(dirpyrLablo[level], dirpyrLablo[level - 1], buffer, level, pitch, totalpitch, mult ); - - } - - - scale = scales[0]; - pitch = pitches[0]; - totalpitch /= pitch; - - idirpyr_eq(dirpyrLablo[0], dst, buffer, 0, pitch, totalpitch, mult ); - - - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - - for (int i = 0; i < dst->H; i++) - for (int j = 0; j < dst->W; j++) { - - // TODO: Is integer cast necessary here? - dst->L[i][j] = CLIP((int)( buffer[0][i][j] )); - dst->a[i][j] = CLIPC((int)( buffer[1][i][j] )); - dst->b[i][j] = CLIPC((int)( buffer[2][i][j] )); - - } - - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - - for(int i = 0; i < maxlevel; i++) { - delete dirpyrLablo[i]; - } - - for (int c = 0; c < 3; c++) { - freeArray(buffer[c], h + 128); - } - - - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -} - -void ImProcFunctions::dirpyr_eq(LabImage* data_fine, LabImage* data_coarse, LUTf & rangefn, int level, int pitch, int scale, const double * mult ) -{ - - //pitch is spacing of subsampling - //scale is spacing of directional averaging weights - //example 1: no subsampling at any level -- pitch=1, scale=2^n - //example 2: subsampling by 2 every level -- pitch=2, scale=1 at each level - //example 3: no subsampling at first level, subsampling by 2 thereafter -- - // pitch =1, scale=1 at first level; pitch=2, scale=2 thereafter - - - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - // calculate weights, compute directionally weighted average - - int width = data_fine->W; - int height = data_fine->H; - - - - //generate domain kernel - int halfwin = 1;//min(ceil(2*sig),3); - int scalewin = halfwin * scale; - - -#ifdef _OPENMP - #pragma omp parallel for -#endif - - for(int i = 0; i < height; i += pitch) { - int i1 = i / pitch; - - for(int j = 0, j1 = 0; j < width; j += pitch, j1++) { - float Lout, aout, bout; - float norm; - norm = 0;//if we do want to include the input pixel in the sum - Lout = 0; - aout = 0; - bout = 0; - - for(int inbr = max(0, i - scalewin); inbr <= min(height - 1, i + scalewin); inbr += scale) { - for (int jnbr = max(0, j - scalewin); jnbr <= min(width - 1, j + scalewin); jnbr += scale) { - float dirwt = DIRWT(inbr, jnbr, i, j); - Lout += dirwt * data_fine->L[inbr][jnbr]; - aout += dirwt * data_fine->a[inbr][jnbr]; - bout += dirwt * data_fine->b[inbr][jnbr]; - norm += dirwt; - } - } - - data_coarse->L[i1][j1] = Lout / norm; //low pass filter - data_coarse->a[i1][j1] = aout / norm; - data_coarse->b[i1][j1] = bout / norm; - } - } - - - - -} - -//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -void ImProcFunctions::idirpyr_eq(LabImage* data_coarse, LabImage* data_fine, int *** buffer, int level, int pitch, int scale, const double * mult ) -{ - - int width = data_fine->W; - int height = data_fine->H; - - float lumamult[4], chromamult[4]; - - for (int i = 0; i < 4; i++) { - lumamult[i] = mult[i]; - chromamult[i] = mult[i + 4]; - } - - float wtdsum[6], norm, dirwt; - float hipass[3]; - int i1, j1; - - - // for coarsest level, take non-subsampled lopass image and subtract from lopass_fine to generate hipass image - - // denoise hipass image, add back into lopass_fine to generate denoised image at fine scale - - // now iterate: - // (1) take denoised image at level n, expand and smooth using gradient weights from lopass image at level n-1 - // the result is the smoothed image at level n-1 - // (2) subtract smoothed image at level n-1 from lopass image at level n-1 to make hipass image at level n-1 - // (3) denoise the hipass image at level n-1 - // (4) add the denoised image at level n-1 to the smoothed image at level n-1 to make the denoised image at level n-1 - - // note that the coarsest level amounts to skipping step (1) and doing (2,3,4). - // in other words, skip step one if pitch=1 - - - - if (pitch == 1) { - // step (1-2-3-4) -#ifdef _OPENMP - #pragma omp parallel for -#endif - - for(int i = 0; i < height; i++) - for(int j = 0; j < width; j++) { - - //luma - float hipass0 = (float)data_fine->L[i][j] - data_coarse->L[i][j]; - buffer[0][i * scale][j * scale] += hipass0 * lumamult[level]; //*luma; - - //chroma - float hipass1 = data_fine->a[i][j] - data_coarse->a[i][j]; - float hipass2 = data_fine->b[i][j] - data_coarse->b[i][j]; - buffer[1][i * scale][j * scale] += hipass1 * chromamult[level]; //*chroma; - buffer[2][i * scale][j * scale] += hipass2 * chromamult[level]; //*chroma; - } - - } else { - - // step (1) - //if (pitch>1), pitch=2; expand coarse image, fill in missing data - - LabImage* smooth; - smooth = new LabImage(width, height); -#ifdef _OPENMP - #pragma omp parallel -#endif - - { -#ifdef _OPENMP - #pragma omp for -#endif - - for(int i = 0; i < height; i += pitch) { - int i2 = i / pitch; - - for(int j = 0, j2 = 0; j < width; j += pitch, j2++) { - - //copy common pixels - smooth->L[i][j] = data_coarse->L[i2][j2]; - smooth->a[i][j] = data_coarse->a[i2][j2]; - smooth->b[i][j] = data_coarse->b[i2][j2]; - } - } - -#ifdef _OPENMP - #pragma omp for -#endif - - for(int i = 0; i < height - 1; i += 2) - for(int j = 0; j < width - 1; j += 2) { - //do midpoint first - norm = dirwt = 0; - wtdsum[0] = wtdsum[1] = wtdsum[2] = wtdsum[3] = wtdsum[4] = wtdsum[5] = 0.0; - - for(i1 = i; i1 < min(height, i + 3); i1 += 2) - for (j1 = j; j1 < min(width, j + 3); j1 += 2) { - dirwt = 1;//IDIRWT(i1, j1, i, j); - wtdsum[0] += dirwt * smooth->L[i1][j1]; - wtdsum[1] += dirwt * smooth->a[i1][j1]; - wtdsum[2] += dirwt * smooth->b[i1][j1]; - wtdsum[3] += dirwt * buffer[0][i1 * scale][j1 * scale]; // not completely right if j1*scale or i1*scale is out of bounds of original image ??? - wtdsum[4] += dirwt * buffer[1][i1 * scale][j1 * scale]; // also should we use directional average? - wtdsum[5] += dirwt * buffer[2][i1 * scale][j1 * scale]; - norm += dirwt; - } - - norm = 1 / norm; - smooth->L[i + 1][j + 1] = wtdsum[0] * norm; - smooth->a[i + 1][j + 1] = wtdsum[1] * norm; - smooth->b[i + 1][j + 1] = wtdsum[2] * norm; - buffer[0][(i + 1)*scale][(j + 1)*scale] = wtdsum[3] * norm; - buffer[1][(i + 1)*scale][(j + 1)*scale] = wtdsum[4] * norm; - buffer[2][(i + 1)*scale][(j + 1)*scale] = wtdsum[5] * norm; - } - -#ifdef _OPENMP - #pragma omp for -#endif - - for(int i = 0; i < height - 1; i += 2) - for(int j = 0; j < width - 1; j += 2) { - //now right neighbor - if (j + 1 == width) { - continue; - } - - norm = dirwt = 0; - wtdsum[0] = wtdsum[1] = wtdsum[2] = wtdsum[3] = wtdsum[4] = wtdsum[5] = 0.0; - - for (j1 = j; j1 < min(width, j + 3); j1 += 2) { - dirwt = 1;//IDIRWT(i, j1, i, j); - wtdsum[0] += dirwt * smooth->L[i][j1]; - wtdsum[1] += dirwt * smooth->a[i][j1]; - wtdsum[2] += dirwt * smooth->b[i][j1]; - wtdsum[3] += dirwt * buffer[0][i * scale][j1 * scale]; - wtdsum[4] += dirwt * buffer[1][i * scale][j1 * scale]; - wtdsum[5] += dirwt * buffer[2][i * scale][j1 * scale]; - norm += dirwt; - } - - for (i1 = max(0, i - 1); i1 < min(height, i + 2); i1 += 2) { - dirwt = 1;//IDIRWT(i1, j+1, i, j); - wtdsum[0] += dirwt * smooth->L[i1][j + 1]; - wtdsum[1] += dirwt * smooth->a[i1][j + 1]; - wtdsum[2] += dirwt * smooth->b[i1][j + 1]; - wtdsum[3] += dirwt * buffer[0][i1 * scale][(j + 1) * scale]; - wtdsum[4] += dirwt * buffer[1][i1 * scale][(j + 1) * scale]; - wtdsum[5] += dirwt * buffer[2][i1 * scale][(j + 1) * scale]; - norm += dirwt; - } - - norm = 1 / norm; - smooth->L[i][j + 1] = wtdsum[0] * norm; - smooth->a[i][j + 1] = wtdsum[1] * norm; - smooth->b[i][j + 1] = wtdsum[2] * norm; - buffer[0][i][(j + 1)*scale] = wtdsum[3] * norm; - buffer[1][i][(j + 1)*scale] = wtdsum[4] * norm; - buffer[2][i][(j + 1)*scale] = wtdsum[5] * norm; - - //now down neighbor - if (i + 1 == height) { - continue; - } - - norm = 0; - wtdsum[0] = wtdsum[1] = wtdsum[2] = wtdsum[3] = wtdsum[4] = wtdsum[5] = 0.0; - - for (i1 = i; i1 < min(height, i + 3); i1 += 2) { - dirwt = 1;//IDIRWT(i1, j, i, j); - wtdsum[0] += dirwt * smooth->L[i1][j]; - wtdsum[1] += dirwt * smooth->a[i1][j]; - wtdsum[2] += dirwt * smooth->b[i1][j]; - wtdsum[3] += dirwt * buffer[0][i1 * scale][j * scale]; - wtdsum[4] += dirwt * buffer[1][i1 * scale][j * scale]; - wtdsum[5] += dirwt * buffer[2][i1 * scale][j * scale]; - norm += dirwt; - } - - for (j1 = max(0, j - 1); j1 < min(width, j + 2); j1 += 2) { - dirwt = 1;//IDIRWT(i+1, j1, i, j); - wtdsum[0] += dirwt * smooth->L[i + 1][j1]; - wtdsum[1] += dirwt * smooth->a[i + 1][j1]; - wtdsum[2] += dirwt * smooth->b[i + 1][j1]; - wtdsum[3] += dirwt * buffer[0][(i + 1) * scale][j1 * scale]; - wtdsum[4] += dirwt * buffer[1][(i + 1) * scale][j1 * scale]; - wtdsum[5] += dirwt * buffer[2][(i + 1) * scale][j1 * scale]; - norm += dirwt; - } - - norm = 1 / norm; - smooth->L[i + 1][j] = wtdsum[0] * norm; - smooth->a[i + 1][j] = wtdsum[1] * norm; - smooth->b[i + 1][j] = wtdsum[2] * norm; - buffer[0][(i + 1)*scale][j * scale] = wtdsum[3] * norm; - buffer[1][(i + 1)*scale][j * scale] = wtdsum[4] * norm; - buffer[2][(i + 1)*scale][j * scale] = wtdsum[5] * norm; - - } - - - // step (2-3-4) -#ifdef _OPENMP - #pragma omp for -#endif - - for(int i = 0; i < height; i++) - for(int j = 0; j < width; j++) { - - //luma - hipass[0] = (float)data_fine->L[i][j] - smooth->L[i][j]; - buffer[0][i * scale][j * scale] += hipass[0] * lumamult[level]; //*luma; - - //chroma - hipass[1] = data_fine->a[i][j] - smooth->a[i][j]; - hipass[2] = data_fine->b[i][j] - smooth->b[i][j]; - buffer[1][i * scale][j * scale] += hipass[1] * chromamult[level]; //*chroma; - buffer[2][i * scale][j * scale] += hipass[2] * chromamult[level]; //*chroma; - } - } // end parallel - delete smooth; - - } -} - - -#undef DIRWT_L -#undef DIRWT_AB - -#undef NRWT_L -#undef NRWT_AB - -} - diff --git a/rtengine/ex2simple.cc b/rtengine/ex2simple.cc deleted file mode 100644 index 1a83526e7..000000000 --- a/rtengine/ex2simple.cc +++ /dev/null @@ -1,150 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * Copyright (c) 2004-2010 Gabor Horvath - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RawTherapee. If not, see . - */ -#include "rtengine.h" -#include -//#include -#include - -class PListener : public rtengine::ProgressListener -{ - -public: - void setProgressStr (Glib::ustring str) - { - std::cout << str << std::endl; - } - void setProgress (double p) - { - std::cout << p << std::endl; - } -}; - -class MyPrevImgListener : public rtengine::PreviewImageListener -{ - - IImage8* i; - -public: - // this method is called when the staged image processor creates a new image to store the resulting preview image (this does not happen too often) - // usually you just have to store it - void setImage (IImage8* img, double scale, procparams::CropParams cp) - { - i = img; - } - // if the staged image processor wants to delete the image that stores the preview image, it calls this method. You have to destroy the image. - void delImage (IImage8* img) - { - if (img) { - // make sure we dont use this image in an other thread - IImage8* temp = i; - i->getMutex().lock (); - i = NULL; - temp->getMutex().unlock (); - // free it - img->free (); - } - } - // if the preview image changes, this method is called - void imageReady (procparams::CropParams cp) - { - // initiate a redraw in the background and return as fast as possible - } - // a possible redraw function: - //void redraw () { - // if (i) { - // i->lock (); - // int w = i->getWidth (); - // int h = i->getHeigt (); - // const char* data = i->getData (); - // ... draw it ... - // i->unlock (); - // } - // } -}; - -int main (int argc, char* argv[]) -{ - - if (argc < 4) { - std::cout << "Usage: rtcmd " << std::endl; - exit(1); - } - - Glib::thread_init (); - - // create and fill settings - rtengine::Settings* s = rtengine::Settings::create (); - s->demosaicMethod = "hphd"; - s->colorCorrectionSteps = 2; - s->iccDirectory = ""; - s->colorimetricIntent = 1; - s->monitorProfile = ""; - // init rtengine - rtengine::init (s); - // the settings can be modified later through the "s" pointer without calling any api function - - // Create a listener object. Any class is appropriate that inherits from rtengine::ProgressListener - PListener pl; - - // Load the image given in the first command line parameter - rtengine::InitialImage* ii; - int errorCode; - ii = rtengine::InitialImage::load (argv[1], true, errorCode, &pl); - - if (!ii) { - ii = rtengine::InitialImage::load (argv[1], false, errorCode, &pl); - } - - if (!ii) { - std::cout << "Input file not supported." << std::endl; - exit(2); - } - - /* Second scenario. Create a stagedimageprocessor with a preview scale of 1:5 and change few things */ - MyPrevImgListener myPrevImgListener; - - StagedImageProcessor* ipc = StagedImageProcessor::create (ii); - ipc->setProgressListener (&pl); - ipc->setPreviewImageListener (&myPrevImgListener); - ipc->setPreviewScale (5); // preview scale = 1:5 - // you can add a histogram listener, too, that is notified when the histogram changes - // ipc->setHistogramListener (...); - // you can add autoexplistener that is notified about the exposure settings when the auto exp algorithm finishes - // ipc->setAutoExpListener (curve); - // you can add sizelistener if you want to be notified when the size of the final image changes (due to rotation/resize/etc) - // ipc->setSizeListener (crop); - - // if you want to change the settings you have to ask for the procparams structure of the staged image processor - // you have to tell it what has changed. At the first time tell it EvPhotoLoaded so a full processing will be performed - rtengine::procparams::ProcParams* params = ipc->beginUpdateParams (); - // change this and that... - params->toneCurve.brightness = 1.0; - // you can load it, too, from a file: params->load (argv[2]); - // finally you have to call this non-blocking method, and the image processing starts in the background. When finished, the preview image listener will be notified - ipc->endUpdateParams (rtengine::EvPhotoLoaded); - // you can go on with changing of the settings, following the gui actions - // now we know that only the brightness has changed compared to the previous settings, to only a part of the processing has to be repeated - params = ipc->beginUpdateParams (); - params->toneCurve.brightness = 1.2; - ipc->endUpdateParams (rtengine::EvBrightness); - - // ... and so on. If you dont need it any more, you can destroy it (make sure that no processing is happening when you destroy it!) - StagedImageProcessor::destroy (ipc); -} - diff --git a/rtengine/ffmanager.cc b/rtengine/ffmanager.cc index 8b26c3121..069bbf563 100644 --- a/rtengine/ffmanager.cc +++ b/rtengine/ffmanager.cc @@ -31,17 +31,19 @@ extern const Settings* settings; inline ffInfo& ffInfo::operator =(const ffInfo &o) { - pathname = o.pathname; - maker = o.maker; - model = o.model; - lens = o.lens; - shutter = o.shutter; - focallength = o.focallength; - timestamp = o.timestamp; + if (this != &o) { + pathname = o.pathname; + maker = o.maker; + model = o.model; + lens = o.lens; + focallength = o.focallength; + timestamp = o.timestamp; + aperture = o.aperture; - if( ri ) { - delete ri; - ri = NULL; + if( ri ) { + delete ri; + ri = nullptr; + } } return *this; @@ -131,7 +133,7 @@ void ffInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { int H = ri->get_height(); int W = ri->get_width(); @@ -193,7 +195,7 @@ void ffInfo::updateRawImage() if( ri->loadRaw(true)) { delete ri; - ri = NULL; + ri = nullptr; } else { ri->compress_image(); } @@ -291,11 +293,11 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto file = Gio::File::create_for_path (filename); if (!file ) { - return 0; + return nullptr; } if (!file->query_exists ()) { - return 0; + return nullptr; } try { @@ -303,11 +305,11 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) auto info = file->query_info (); if (!info || info->get_file_type () == Gio::FILE_TYPE_DIRECTORY) { - return 0; + return nullptr; } if (!options.fbShowHidden && info->is_hidden ()) { - return 0; + return nullptr; } Glib::ustring ext; @@ -319,7 +321,7 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) } if (!options.is_extention_enabled (ext)) { - return 0; + return nullptr; } @@ -327,7 +329,7 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) int res = ri.loadRaw (false); // Read informations about shot if (res != 0) { - return 0; + return nullptr; } ffList_t::iterator iter; @@ -367,7 +369,7 @@ ffInfo* FFManager::addFileInfo (const Glib::ustring& filename, bool pool) } catch (Gio::Error&) {} - return 0; + return nullptr; } void FFManager::getStat( int &totFiles, int &totTemplates) @@ -394,7 +396,7 @@ void FFManager::getStat( int &totFiles, int &totTemplates) ffInfo* FFManager::find( const std::string &mak, const std::string &mod, const std::string &len, double focal, double apert, time_t t ) { if( ffList.empty() ) { - return 0; + return nullptr; } std::string key( ffInfo::key(mak, mod, len, focal, apert) ); @@ -428,7 +430,7 @@ ffInfo* FFManager::find( const std::string &mak, const std::string &mod, const s } } - return bestD != INFINITY ? &(bestMatch->second) : 0 ; + return bestD != INFINITY ? &(bestMatch->second) : nullptr ; } } @@ -439,7 +441,7 @@ RawImage* FFManager::searchFlatField( const std::string &mak, const std::string if( ff ) { return ff->getRawImage(); } else { - return 0; + return nullptr; } } @@ -457,7 +459,7 @@ RawImage* FFManager::searchFlatField( const Glib::ustring filename ) return ff->getRawImage(); } - return 0; + return nullptr; } diff --git a/rtengine/ffmanager.h b/rtengine/ffmanager.h index 5f6b2d267..4a65c2ed7 100644 --- a/rtengine/ffmanager.h +++ b/rtengine/ffmanager.h @@ -34,18 +34,16 @@ public: std::string maker; ///< manufacturer std::string model; ///< model std::string lens; ///< lens - int iso; ///< ISO (gain) - double shutter; ///< shutter or exposure time in sec double aperture; ///< aperture in stops double focallength; ///< focal length in mm time_t timestamp; ///< seconds since 1 Jan 1970 ffInfo(const Glib::ustring &name, const std::string &mak, const std::string &mod, const std::string & len, double focal, double apert, time_t t) - : pathname(name), maker(mak), model(mod), lens(len), aperture(apert), focallength(focal), timestamp(t), ri(NULL) {} + : pathname(name), maker(mak), model(mod), lens(len), aperture(apert), focallength(focal), timestamp(t), ri(nullptr) {} ffInfo( const ffInfo &o) - : pathname(o.pathname), maker(o.maker), model(o.model), lens(o.lens), aperture(o.aperture), focallength(o.focallength), timestamp(o.timestamp), ri(NULL) {} + : pathname(o.pathname), maker(o.maker), model(o.model), lens(o.lens), aperture(o.aperture), focallength(o.focallength), timestamp(o.timestamp), ri(nullptr) {} ~ffInfo() { if( ri ) { diff --git a/rtengine/flatcurves.cc b/rtengine/flatcurves.cc index 5a4dfeacf..ae1a895ff 100644 --- a/rtengine/flatcurves.cc +++ b/rtengine/flatcurves.cc @@ -311,10 +311,10 @@ void FlatCurve::CtrlPoints_set () if (nbr_points < 0) { for(size_t it = 0; it < sc_x.size(); it += 3) { - printf("sc_length[%zd/3]=%f \n", it, sc_length[it / 3]); + printf("sc_length[%zu/3]=%f \n", it, sc_length[it / 3]); } - printf("Flat curve: error detected!\n i=%d k=%d periodic=%d nbr_points=%d ppn=%d N=%d sc_length[i/3]=%f total_length=%f\n", i, k, periodic, nbr_points, ppn, N, sc_length[i / 3], total_length); + printf("Flat curve: error detected!\n i=%u k=%u periodic=%d nbr_points=%d ppn=%d N=%d sc_length[i/3]=%f total_length=%f\n", i, k, periodic, nbr_points, ppn, N, sc_length[i / 3], total_length); exit(0); } diff --git a/rtengine/hlmultipliers.cc b/rtengine/hlmultipliers.cc deleted file mode 100644 index 35e1d3e87..000000000 --- a/rtengine/hlmultipliers.cc +++ /dev/null @@ -1,441 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * Copyright (c) 2004-2010 Gabor Horvath - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RawTherapee. If not, see . - */ -#include -#include -#include "rawimagesource.h" -#include "rawimagesource_i.h" -#include "jaggedarray.h" -#include "../rtgui/options.h" - -namespace rtengine -{ - -// computes highlight recovery multipliers. Needs a possibly downscaled image where -// the highlights are indicated by INT_MAX -void hlmultipliers (int** rec[3], int max_3[3], int dh, int dw) -{ - - // STEP I. recover color with two-color information - int phase = -1; - int k = 0; - - for (k = 0; k < 1000; k++) { - int changed = 0; - - for (int i = 1; i < dh - 1; i++) - for (int j = 1; j < dw - 1; j++) { - int co, c1, c2; - -// if (phase==2) -// phase++; -// if (phase>0)// && phase!=4) -// continue; - if (phase == -1 || phase == 0 || phase == 2) { - if (rec[0][i][j] == INT_MAX && rec[1][i][j] != INT_MAX && rec[1][i][j] >= 0 && rec[2][i][j] != INT_MAX && rec[2][i][j] >= 0) { - co = 0; - c1 = 1; - c2 = 2; - } else if (rec[1][i][j] == INT_MAX && rec[0][i][j] != INT_MAX && rec[0][i][j] >= 0 && rec[2][i][j] != INT_MAX && rec[2][i][j] >= 0) { - co = 1; - c1 = 0; - c2 = 2; - } else if (rec[2][i][j] == INT_MAX && rec[1][i][j] != INT_MAX && rec[1][i][j] >= 0 && rec[0][i][j] != INT_MAX && rec[0][i][j] >= 0) { - co = 2; - c1 = 1; - c2 = 0; - } else { - continue; - } - - double ratio[2] = {0.0, 0.0}; - int count = 0; - double rato = (double)rec[c1][i][j] / rec[c2][i][j]; - double arato = 0.0; - - if (phase == 2) { - for (int x = -1; x <= 1; x++) - for (int y = -1; y <= 1; y++) { - // average m/c color ratios in the surrounding pixels - if (rec[co][i + x][j + y] >= 0 && rec[co][i + x][j + y] != INT_MAX && rec[c1][i + x][j + y] >= 0 && rec[c1][i + x][j + y] != INT_MAX && rec[c2][i + x][j + y] > 0 && rec[c2][i + x][j + y] != INT_MAX) { - double ratt = (double)rec[c1][i + x][j + y] / rec[c2][i + x][j + y]; - - if (ratt > rato * 1.2 || ratt < rato / 1.2 || rec[co][i + x][j + y] < max_3[co] * 1 / 2) { - continue; - } - - ratio[0] += (double)rec[c1][i + x][j + y] / rec[co][i + x][j + y]; - ratio[1] += (double)rec[c2][i + x][j + y] / rec[co][i + x][j + y]; - count++; - } - } - } else if (phase == -1) { - for (int x = -1; x <= 1; x++) - for (int y = -1; y <= 1; y++) { - // average m/c color ratios in the surrounding pixels - if (rec[co][i + x][j + y] >= 0 && rec[co][i + x][j + y] != INT_MAX && rec[c1][i + x][j + y] >= 0 && rec[c1][i + x][j + y] != INT_MAX && rec[c2][i + x][j + y] > 0 && rec[c2][i + x][j + y] != INT_MAX) { - double ratt = (double)rec[c1][i + x][j + y] / rec[c2][i + x][j + y]; - - if (ratt > rato * 1.05 || ratt < rato / 1.05 || rec[co][i + x][j + y] < max_3[co] * 4 / 5) { - continue; - } - - arato += ratt; - ratio[0] += (double)rec[c1][i + x][j + y] / rec[co][i + x][j + y]; - ratio[1] += (double)rec[c2][i + x][j + y] / rec[co][i + x][j + y]; - - count++; - } - } - } else { - for (int x = -1; x <= 1; x++) - for (int y = -1; y <= 1; y++) { - // average m/c color ratios in the surrounding pixels - if (rec[co][i + x][j + y] >= 0 && rec[co][i + x][j + y] != INT_MAX && rec[c1][i + x][j + y] >= 0 && rec[c1][i + x][j + y] != INT_MAX && rec[c2][i + x][j + y] > 0 && rec[c2][i + x][j + y] != INT_MAX) { - double ratt = (double)rec[c1][i + x][j + y] / rec[c2][i + x][j + y]; - - if (ratt > rato * 1.1 || ratt < rato / 1.1 || rec[co][i + x][j + y] < max_3[co] * 3 / 4) { - continue; - } - - arato += ratt; - ratio[0] += (double)rec[c1][i + x][j + y] / rec[co][i + x][j + y]; - ratio[1] += (double)rec[c2][i + x][j + y] / rec[co][i + x][j + y]; - - count++; - } - } - } - - // compute new pixel values from the surrounding color ratios - if (count > 1) { //(phase==0 && count>1) || (phase==2 && count>1)) { - rec[co][i][j] = -(int)((rec[c1][i][j] / ratio[0] * count + rec[c2][i][j] / ratio[1] * count) / 2); - changed++; - } - } else if (phase == 1 || phase == 3) { - if (rec[0][i][j] == INT_MAX && rec[1][i][j] == INT_MAX && rec[2][i][j] != INT_MAX && rec[2][i][j] >= 0) { - co = 2; - c1 = 0; - c2 = 1; - } else if (rec[0][i][j] == INT_MAX && rec[2][i][j] == INT_MAX && rec[1][i][j] != INT_MAX && rec[1][i][j] >= 0) { - co = 1; - c1 = 0; - c2 = 2; - } else if (rec[1][i][j] == INT_MAX && rec[2][i][j] == INT_MAX && rec[0][i][j] != INT_MAX && rec[0][i][j] >= 0) { - co = 0; - c1 = 1; - c2 = 2; - } else { - continue; - } - - double ratio[2] = {0.0, 0.0}; - int count[2] = {0, 0}; - - for (int x = -1; x <= 1; x++) - for (int y = -1; y <= 1; y++) { - // average m/c color ratios in the surrounding pixels - if (rec[co][i + x][j + y] >= 0 && rec[co][i + x][j + y] != INT_MAX && rec[c1][i + x][j + y] > 0 && rec[c1][i + x][j + y] != INT_MAX) { - if ((phase == 1 && rec[c1][i + x][j + y] < max_3[c1] * 3 / 4) || (phase == 3 && rec[c1][i + x][j + y] < max_3[c1] * 1 / 2)) { - continue; - } - - ratio[0] += (double)rec[co][i + x][j + y] / rec[c1][i + x][j + y]; - count[0] ++; - } - - if (rec[co][i + x][j + y] >= 0 && rec[co][i + x][j + y] != INT_MAX && rec[c2][i + x][j + y] > 0 && rec[c2][i + x][j + y] != INT_MAX) { - if ((phase == 1 && rec[c2][i + x][j + y] < max_3[c2] * 3 / 4) || (phase == 3 && rec[c2][i + x][j + y] < max_3[c2] * 1 / 2)) -// if (/*phase!=3 && */rec[c2][i+x][j+y] 2) || (phase == 3 && count[0] > 1)) { - rec[c1][i][j] = - (int) ((double)rec[co][i][j] / ratio[0] * count[0]); - changed++; - } - - if ((phase == 1 && count[1] > 2) || (phase == 3 && count[1] > 1)) { - rec[c2][i][j] = - (int) ((double)rec[co][i][j] / ratio[1] * count[1]); - changed++; - } - } else { - int val = 0; - int num = 0; - - for (int c = 0; c < 3; c++) - if (rec[c][i][j] != INT_MAX) { - val += rec[c][i][j]; - num++; - } - - if (num < 3 && num > 0) { - for (int c = 0; c < 3; c++) { - rec[c][i][j] = val / num; - } - } - } - } - - - bool change = false; - - for (int i = 1; i < dh - 1; i++) - for (int j = 1; j < dw - 1; j++) - for (int c = 0; c < 3; c++) { - if (rec[c][i][j] < 0) { - rec[c][i][j] = -rec[c][i][j]; - change = true; - } - } - - if (!change && phase < 4) { - phase++; - - if( options.rtSettings.verbose ) { - printf ("phc %d: %d\n", phase, k); - } - } else if (!change) { - break; - } - - if (k % 20 == 0 && options.rtSettings.verbose ) { - printf ("changed %d\n", changed); - } - } - - if( options.rtSettings.verbose ) { - printf ("Highlight recovery ends in %d iterations\n", k); - } - - int maxval = max(max_3[0], max_3[1], max_3[2]); - - for (int i = 0; i < dh; i++) - for (int j = 0; j < dw; j++) - if (rec[0][i][j] == INT_MAX || rec[1][i][j] == INT_MAX || rec[2][i][j] == INT_MAX) { - rec[0][i][j] = maxval; - rec[1][i][j] = maxval; - rec[2][i][j] = maxval; - - } -} - -void RawImageSource::HLRecovery_ColorPropagation (float* red, float* green, float* blue, int i, int sx1, int width, int skip) -{ - - int blr = (i + HR_SCALE / 2) / HR_SCALE - 1; - - if (blr < 0 || blr >= H / HR_SCALE - 2) { - return; - } - - double mr1 = 1.0 - ((double)((i + HR_SCALE / 2) % HR_SCALE) / HR_SCALE + 0.5 / HR_SCALE); - int maxcol = W / HR_SCALE - 2; - - for (int j = sx1, jx = 0; jx < width; j += skip, jx++) { - if (needhr[i][j]) { - int blc = (j + HR_SCALE / 2) / HR_SCALE - 1; - - if (blc < 0 || blc >= maxcol) { - continue; - } - - double mc1 = 1.0 - ((double)((j + HR_SCALE / 2) % HR_SCALE) / HR_SCALE + 0.5 / HR_SCALE); - double mulr = mr1 * mc1 * hrmap[0][blr][blc] + mr1 * (1.0 - mc1) * hrmap[0][blr][blc + 1] + (1.0 - mr1) * mc1 * hrmap[0][blr + 1][blc] + (1.0 - mr1) * (1.0 - mc1) * hrmap[0][blr + 1][blc + 1]; - double mulg = mr1 * mc1 * hrmap[1][blr][blc] + mr1 * (1.0 - mc1) * hrmap[1][blr][blc + 1] + (1.0 - mr1) * mc1 * hrmap[1][blr + 1][blc] + (1.0 - mr1) * (1.0 - mc1) * hrmap[1][blr + 1][blc + 1]; - double mulb = mr1 * mc1 * hrmap[2][blr][blc] + mr1 * (1.0 - mc1) * hrmap[2][blr][blc + 1] + (1.0 - mr1) * mc1 * hrmap[2][blr + 1][blc] + (1.0 - mr1) * (1.0 - mc1) * hrmap[2][blr + 1][blc + 1]; - red[jx] = (red[jx] * mulr); - green[jx] = (green[jx] * mulg); - blue[jx] = (blue[jx] * mulb); - } else { - red[jx] = (red[jx]); - green[jx] = (green[jx]); - blue[jx] = (blue[jx]); - } - } -} - -void RawImageSource::updateHLRecoveryMap_ColorPropagation () -{ - - // detect maximal pixel values - float* red = new float[W]; - float* blue = new float[W]; - int maxr = 0, maxg = 0, maxb = 0; - - for (int i = 32; i < H - 32; i++) { - interpolate_row_rb (red, blue, green[i - 1], green[i], green[i + 1], i); - - for (int j = 32; j < W - 32; j++) { - if ((ri->ISRED(i, j) || ri->getSensorType() != ST_BAYER) && red[j] > maxr) { - maxr = red[j]; - } - - if ((ri->ISGREEN(i, j) || ri->getSensorType() != ST_BAYER) && green[i][j] > maxg) { - maxg = green[i][j]; - } - - if ((ri->ISBLUE(i, j) || ri->getSensorType() != ST_BAYER) && blue[j] > maxb) { - maxb = blue[j]; - } - } - } - - delete [] red; - delete [] blue; - - maxr = maxr * 19 / 20; - maxg = maxg * 19 / 20; - maxb = maxb * 19 / 20; - max_3[0] = maxr; - max_3[1] = maxg; - max_3[2] = maxb; - - // downscale image - int dw = W / HR_SCALE; - int dh = H / HR_SCALE; - Image16* ds = new Image16 (dw, dh); - - // overburnt areas - int** rec[3]; - - for (int i = 0; i < 3; i++) { - rec[i] = allocJaggedArray (dw, dh); - } - - float* reds[HR_SCALE]; - float* blues[HR_SCALE]; - - for (int i = 0; i < HR_SCALE; i++) { - reds[i] = new float[W]; - blues[i] = new float[W]; - } - - if (needhr) { - freeJaggedArray(needhr); - } - - needhr = allocJaggedArray (W, H); - - for (int i = 0; i < dh; i++) { - for (int j = 0; j < HR_SCALE; j++) { - interpolate_row_rb (reds[j], blues[j], green[HR_SCALE * i + j - 1], green[HR_SCALE * i + j], green[HR_SCALE * i + j + 1], HR_SCALE * i + j); - - for (int k = 0; k < W; k++) - if (reds[j][k] >= max_3[0] || green[HR_SCALE * i + j][k] >= max_3[1] || blues[j][k] >= max_3[2]) { - needhr[HR_SCALE * i + j][k] = 1; - } else { - needhr[HR_SCALE * i + j][k] = 0; - } - } - - for (int j = 0; j < dw; j++) { - int sumr = 0; - int cr = 0; - int sumg = 0; - int cg = 0; - int sumb = 0; - int cb = 0; - - for (int x = 0; x < HR_SCALE; x++) - for (int y = 0; y < HR_SCALE; y++) { - int ix = HR_SCALE * i + x; - int jy = HR_SCALE * j + y; - sumr += reds[x][jy]; - - if (reds[x][jy] < maxr) { - cr++; - } - - sumg += green[ix][jy]; - - if (green[ix][jy] < maxg) { - cg++; - } - - sumb += blues[x][jy]; - - if (blues[x][jy] < maxb) { - cb++; - } - } - - if (cr < HR_SCALE * HR_SCALE) { - rec[0][i][j] = INT_MAX; - } else { - rec[0][i][j] = sumr / HR_SCALE / HR_SCALE; - } - - if (cg < HR_SCALE * HR_SCALE) { - rec[1][i][j] = INT_MAX; - } else { - rec[1][i][j] = sumg / HR_SCALE / HR_SCALE; - } - - if (cb < HR_SCALE * HR_SCALE) { - rec[2][i][j] = INT_MAX; - } else { - rec[2][i][j] = sumb / HR_SCALE / HR_SCALE; - } - - ds->r(i, j) = sumr / HR_SCALE / HR_SCALE; - ds->g(i, j) = sumg / HR_SCALE / HR_SCALE; - ds->b(i, j) = sumb / HR_SCALE / HR_SCALE; - } - } - - for (int i = 0; i < HR_SCALE; i++) { - delete [] reds[i]; - delete [] blues[i]; - } - - hlmultipliers (rec, max_3, dh, dw); - - if (hrmap[0] != NULL) { - freeJaggedArray (hrmap[0]); - freeJaggedArray (hrmap[1]); - freeJaggedArray (hrmap[2]); - } - - hrmap[0] = allocJaggedArray (dw, dh); - hrmap[1] = allocJaggedArray (dw, dh); - hrmap[2] = allocJaggedArray (dw, dh); - - for (int i = 0; i < dh; i++) - for (int j = 0; j < dw; j++) { - hrmap[0][i][j] = ds->r(i, j) > 0 ? (double)rec[0][i][j] / ds->r(i, j) : 1.0; - hrmap[1][i][j] = ds->g(i, j) > 0 ? (double)rec[1][i][j] / ds->g(i, j) : 1.0; - hrmap[2][i][j] = ds->b(i, j) > 0 ? (double)rec[2][i][j] / ds->b(i, j) : 1.0; - } - - delete ds; - - freeJaggedArray (rec[0]); - freeJaggedArray (rec[1]); - freeJaggedArray (rec[2]); -} - -} - diff --git a/rtengine/hlrecovery.cc b/rtengine/hlrecovery.cc deleted file mode 100644 index 4f527b660..000000000 --- a/rtengine/hlrecovery.cc +++ /dev/null @@ -1,397 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * Copyright (c) 2004-2010 Gabor Horvath - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RawTherapee. If not, see . - */ - -namespace rtengine -{ - -template T** allocArray (int W, int H) -{ - - T** t = new T*[H]; - - for (int i = 0; i < H; i++) { - t[i] = new T[W]; - } - - return t; -} - -void RawImageSource::updateHLRecoveryMap (bool needred, bool needgreen, bool needblue, bool full) -{ - - // detect maximal pixel values - unsigned short* red = new unsigned short[W]; - unsigned short* blue = new unsigned short[W]; - int maxr = 0, maxg = 0, maxb = 0; - - for (int i = 32; i < H - 32; i++) { - interpolate_row_rb (red, blue, green[i - 1], green[i], green[i + 1], i); - - for (int j = 32; j < W - 32; j++) { - if (red[j] > maxr) { - maxr = red[j]; - } - - if (green[i][j] > maxg) { - maxg = green[i][j]; - } - - if (blue[j] > maxb) { - maxb = blue[j]; - } - } - } - - delete [] red; - delete [] blue; - - maxr = maxr * 19 / 20; - maxg = maxg * 19 / 20; - maxb = maxb * 19 / 20; - int max[3]; - max[0] = maxr; - max[1] = maxg; - max[2] = maxb; - - if( options.rtSettings.verbose ) { - printf ("HLRecoveryMap Maximum: R: %d, G: %d, B: %d\n", maxr, maxg, maxb); - } - - // downscale image - int dw = W / SCALE; - int dh = H / SCALE; - Image16* ds = new Image16 (dw, dh); - - // overburnt areas - int** rec[3]; - - for (int i = 0; i < 3; i++) { - rec[i] = allocArray (dw, dh); - } - - unsigned short* reds[SCALE]; - unsigned short* blues[SCALE]; - - for (int i = 0; i < SCALE; i++) { - reds[i] = new unsigned short[W]; - blues[i] = new unsigned short[W]; - } - - for (int i = 0; i < dh; i++) { - for (int j = 0; j < SCALE; j++) { - interpolate_row_rb (reds[j], blues[j], green[SCALE * i + j - 1], green[SCALE * i + j], green[SCALE * i + j + 1], SCALE * i + j); - } - - for (int j = 0; j < dw; j++) { - int sumr = 0; - int cr = 0; - int sumg = 0; - int cg = 0; - int sumb = 0; - int cb = 0; - - for (int x = 0; x < SCALE; x++) - for (int y = 0; y < SCALE; y++) { - int ix = SCALE * i + x; - int jy = SCALE * j + y; - sumr += reds[x][jy]; - - if (reds[x][jy] < maxr) { - cr++; - } - - sumg += green[ix][jy]; - - if (green[ix][jy] < maxg) { - cg++; - } - - sumb += blues[x][jy]; - - if (blues[x][jy] < maxb) { - cb++; - } - } - - if (cr < SCALE * SCALE && needred) { - rec[0][i][j] = INT_MAX; - } else { - rec[0][i][j] = sumr / SCALE / SCALE; - } - - if (cg < SCALE * SCALE && needgreen) { - rec[1][i][j] = INT_MAX; - } else { - rec[1][i][j] = sumg / SCALE / SCALE; - } - - if (cb < SCALE * SCALE && needblue) { - rec[2][i][j] = INT_MAX; - } else { - rec[2][i][j] = sumb / SCALE / SCALE; - } - - ds->r(i, j) = sumr / SCALE / SCALE; - ds->g(i, j) = sumg / SCALE / SCALE; - ds->b(i, j) = sumb / SCALE / SCALE; - } - } - - for (int i = 0; i < SCALE; i++) { - delete [] reds[i]; - delete [] blues[i]; - } - - - // STEP I. recover color from the partially lost areas - bool phase2 = false; - - for (int k = 0; k < 400; k++) { - if (k > 200) { - phase2 = true; - } - - for (int i = 1; i < dh - 1; i++) - for (int j = 1; j < dw - 1; j++) { - for (int c = 0; c < 3; c++) { - // if channel c is lost - if (rec[c][i][j] == INT_MAX) { - double ratio[2] = {0.0, 0.0}; - double w[2] = {0.0, 0.0}; - int count[2] = {0, 0}; - int ix = 0; - - for (int m = 0; m < 3; m++) { - if (m == c) { - continue; - } - - // if channel m is not lost at this point (or already recovered) - if (rec[m][i][j] != INT_MAX && rec[m][i][j] >= 0) { - for (int x = -1; x <= 1; x++) - for (int y = -1; y <= 1; y++) - - // average m/c color ratios in the surrounding pixels - if (rec[m][i + x][j + y] >= 0 && rec[m][i + x][j + y] != INT_MAX && rec[c][i + x][j + y] > 0 && rec[c][i + x][j + y] != INT_MAX) { - double ww = 1.0; - - if (!phase2 && (/*(double)(rec[m][i+x][j+y] - rec[m][i][j])/max[m]*(rec[m][i+x][j+y] - rec[m][i][j])/max[m] > 1.0/2 || */rec[c][i + x][j + y] < max[c] * 3 / 4)) { - continue; - } - - w[ix] += ww; - ratio[ix] += ww * rec[m][i + x][j + y] / rec[c][i + x][j + y]; - count[ix] ++; - } - } - - ix++; - } - - // compute new pixel values from the surrounding color ratios - double newc = 0.0; - int nc = 0; - ix = 0; - - for (int m = 0; m < 3; m++) { - if (c == m) { - continue; - } - - if (count[ix]) { - newc += (double)rec[m][i][j] / ratio[ix] * w[ix]; - nc++; - } - - ix++; - } - - if (nc) { - rec[c][i][j] = - (int) (newc / nc); - } - } - } - } - - bool change = false; - - for (int i = 0; i < dh; i++) - for (int j = 0; j < dw; j++) - for (int c = 0; c < 3; c++) { - if (rec[c][i][j] < 0) { - rec[c][i][j] = -rec[c][i][j]; - } - - change = true; - } - - if (!change) { - break; - } - } - - printf ("Phase1 vege\n"); - - // STEP II. recover fully lost pixels - if (full) { - int maxY = (299 * max[0] + 587 * max[1] + 114 * max[2]) / 1000; - phase2 = false; - - for (int k = 0; k < 600; k++) { - if (k > 200) { - phase2 = true; - } - - for (int i = 1; i < dh - 1; i++) - for (int j = 1; j < dw - 1; j++) { - if (rec[0][i][j] == INT_MAX || rec[1][i][j] == INT_MAX || rec[2][i][j] == INT_MAX) { - int count = 0; - double yavg = 0, iavg = 0, qavg = 0, weight = 0.0; - - for (int x = -1; x <= 1; x++) - for (int y = -1; y <= 1; y++) - if (rec[0][i + x][j + y] > 0 && rec[0][i + x][j + y] != INT_MAX && rec[1][i + x][j + y] > 0 && rec[1][i + x][j + y] != INT_MAX && rec[2][i + x][j + y] > 0 && rec[2][i + x][j + y] != INT_MAX) { - // convert to yiq - double Y = 0.299 * rec[0][i + x][j + y] + 0.587 * rec[1][i + x][j + y] + 0.114 * rec[2][i + x][j + y]; - double I = 0.596 * rec[0][i + x][j + y] - 0.275 * rec[1][i + x][j + y] - 0.321 * rec[2][i + x][j + y]; - double Q = 0.212 * rec[0][i + x][j + y] - 0.523 * rec[1][i + x][j + y] + 0.311 * rec[2][i + x][j + y]; - - if (Y > maxY * 7 / 10) { - double w = 1.0;// / (I*I+Q*Q); - yavg += Y * w; - iavg += I * w; - qavg += Q * w; - weight += w; - count++; - } - } - - if ((!phase2 && count > 5) || (phase2 && count > 3)) { - double Y = yavg / weight; - double I = iavg / weight; - double Q = qavg / weight; - rec[0][i][j] = - (Y + 0.956 * I + 0.621 * Q); - rec[1][i][j] = - (Y - 0.272 * I - 0.647 * Q); - rec[2][i][j] = - (Y - 1.105 * I + 1.702 * Q); - } - } - - } - - bool change = false; - - for (int i = 0; i < dh; i++) - for (int j = 0; j < dw; j++) - for (int c = 0; c < 3; c++) { - if (rec[c][i][j] < 0) { - rec[c][i][j] = -rec[c][i][j]; - } - - change = true; - } - - if (!change) { - break; - } - } - } - - int maxval = 0; - - for (int i = 0; i < dh; i++) - for (int j = 0; j < dw; j++) - for (int c = 0; c < 3; c++) - if (rec[c][i][j] != INT_MAX && rec[c][i][j] > maxval) { - maxval = rec[c][i][j]; - } - - for (int i = 0; i < dh; i++) - for (int j = 0; j < dw; j++) - if (rec[0][i][j] == INT_MAX || rec[1][i][j] == INT_MAX || rec[2][i][j] == INT_MAX) { - rec[0][i][j] = maxval; - rec[1][i][j] = maxval; - rec[2][i][j] = maxval; - } - - if (hrmap[0] != NULL) { - freeArray (hrmap[0], dh); - freeArray (hrmap[1], dh); - freeArray (hrmap[2], dh); - } - - hrmap[0] = allocArray (dw, dh); - hrmap[1] = allocArray (dw, dh); - hrmap[2] = allocArray (dw, dh); - - this->full = full; - - for (int i = 0; i < dh; i++) - for (int j = 0; j < dw; j++) { - hrmap[0][i][j] = (double)rec[0][i][j] / ds->r(i, j); - hrmap[1][i][j] = (double)rec[1][i][j] / ds->g(i, j); - hrmap[2][i][j] = (double)rec[2][i][j] / ds->b(i, j); - } - - /* for (int i=0; ir(i,j) = CLIP (rec[0][i][j]); - ds->g(i,j) = CLIP (rec[1][i][j]); - ds->b(i,j) = CLIP (rec[2][i][j]); - } - ds->save ("test.png"); - */ - delete ds; - freeArray (rec[0], dh); - freeArray (rec[1], dh); - freeArray (rec[2], dh); - - printf ("HLMap vege\n"); -} - -void RawImageSource::hlRecovery (unsigned short* red, unsigned short* green, unsigned short* blue, int i, int sx1, int sx2, int skip) -{ - - int blr = (i + SCALE / 2) / SCALE - 1; - - if (blr < 0 || blr >= H / SCALE - 1) { - return; - } - - double mr1 = 1.0 - ((double)((i + SCALE / 2) % SCALE) / SCALE + 0.5 / SCALE); - int jx = 0; - int maxcol = W / SCALE; - - for (int j = sx1, jx = 0; j < sx2; j += skip, jx++) { - int blc = (j + SCALE / 2) / SCALE - 1; - - if (blc < 0 || blc >= maxcol - 1) { - continue; - } - - double mc1 = 1.0 - ((double)((j + SCALE / 2) % SCALE) / SCALE + 0.5 / SCALE); - double mulr = mr1 * mc1 * hrmap[0][blr][blc] + mr1 * (1.0 - mc1) * hrmap[0][blr][blc + 1] + (1.0 - mr1) * mc1 * hrmap[0][blr + 1][blc] + (1.0 - mr1) * (1.0 - mc1) * hrmap[0][blr + 1][blc + 1]; - double mulg = mr1 * mc1 * hrmap[1][blr][blc] + mr1 * (1.0 - mc1) * hrmap[1][blr][blc + 1] + (1.0 - mr1) * mc1 * hrmap[1][blr + 1][blc] + (1.0 - mr1) * (1.0 - mc1) * hrmap[1][blr + 1][blc + 1]; - double mulb = mr1 * mc1 * hrmap[2][blr][blc] + mr1 * (1.0 - mc1) * hrmap[2][blr][blc + 1] + (1.0 - mr1) * mc1 * hrmap[2][blr + 1][blc] + (1.0 - mr1) * (1.0 - mc1) * hrmap[2][blr + 1][blc + 1]; - red[jx] = CLIP(red[jx] * mulr); - green[jx] = CLIP(green[jx] * mulg); - blue[jx] = CLIP(blue[jx] * mulb); - } -} -} - diff --git a/rtengine/iccjpeg.cc b/rtengine/iccjpeg.cc index fef281c49..31aa0ec7c 100644 --- a/rtengine/iccjpeg.cc +++ b/rtengine/iccjpeg.cc @@ -142,7 +142,9 @@ marker_is_icc (jpeg_saved_marker_ptr marker) GETJOCTET(marker->data[8]) == 0x49 && GETJOCTET(marker->data[9]) == 0x4C && GETJOCTET(marker->data[10]) == 0x45 && - GETJOCTET(marker->data[11]) == 0x0; + GETJOCTET(marker->data[11]) == 0x0 + ? TRUE + : FALSE; } @@ -180,7 +182,7 @@ read_icc_profile (j_decompress_ptr cinfo, unsigned int data_length[MAX_SEQ_NO + 1]; /* size of profile data in marker */ unsigned int data_offset[MAX_SEQ_NO + 1]; /* offset for data in marker */ - *icc_data_ptr = NULL; /* avoid confusion if FALSE return */ + *icc_data_ptr = nullptr; /* avoid confusion if FALSE return */ *icc_data_len = 0; /* This first pass over the saved markers discovers whether there are @@ -191,7 +193,7 @@ read_icc_profile (j_decompress_ptr cinfo, marker_present[seq_no] = 0; } - for (marker = cinfo->marker_list; marker != NULL; marker = marker->next) { + for (marker = cinfo->marker_list; marker != nullptr; marker = marker->next) { if (marker_is_icc(marker)) { if (num_markers == 0) { num_markers = GETJOCTET(marker->data[13]); @@ -236,12 +238,12 @@ read_icc_profile (j_decompress_ptr cinfo, /* Allocate space for assembled data */ icc_data = (JOCTET *) malloc(total_length * sizeof(JOCTET)); - if (icc_data == NULL) { + if (icc_data == nullptr) { return FALSE; /* oops, out of memory */ } /* and fill it in */ - for (marker = cinfo->marker_list; marker != NULL; marker = marker->next) { + for (marker = cinfo->marker_list; marker != nullptr; marker = marker->next) { if (marker_is_icc(marker)) { JOCTET FAR *src_ptr; JOCTET *dst_ptr; diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 82f280e54..3cb9b4a71 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -32,14 +32,15 @@ #include "../rtgui/options.h" -namespace +namespace rtengine { +extern const Settings* settings; void loadProfiles (const Glib::ustring& dirName, std::map* profiles, - std::map* profileContents, + std::map* profileContents, std::map* profileNames, - bool nameUpper, bool onlyRgb) + bool nameUpper) { if (dirName.empty ()) { return; @@ -76,10 +77,10 @@ void loadProfiles (const Glib::ustring& dirName, } if (profiles) { - const rtengine::ProfileContent content (filePath); + const ProfileContent content (filePath); const cmsHPROFILE profile = content.toProfile (); - if (profile && (!onlyRgb || cmsGetColorSpace (profile) == cmsSigRgbData)) { + if (profile) { profiles->insert (std::make_pair (name, profile)); if (profileContents) { @@ -95,20 +96,20 @@ void loadProfiles (const Glib::ustring& dirName, } catch (Glib::Exception&) {} } -inline void getSupportedIntent (cmsHPROFILE profile, cmsUInt32Number intent, cmsUInt32Number direction, std::uint8_t& result) +inline void getSupportedIntent (cmsHPROFILE profile, cmsUInt32Number intent, cmsUInt32Number direction, uint8_t& result) { if (cmsIsIntentSupported (profile, intent, direction)) { result |= 1 << intent; } } -inline std::uint8_t getSupportedIntents (cmsHPROFILE profile, cmsUInt32Number direction) +inline uint8_t getSupportedIntents (cmsHPROFILE profile, cmsUInt32Number direction) { if (!profile) { return 0; } - std::uint8_t result = 0; + uint8_t result = 0; getSupportedIntent (profile, INTENT_PERCEPTUAL, direction, result); getSupportedIntent (profile, INTENT_RELATIVE_COLORIMETRIC, direction, result); @@ -121,7 +122,7 @@ inline std::uint8_t getSupportedIntents (cmsHPROFILE profile, cmsUInt32Number di inline cmsHPROFILE createXYZProfile () { double mat[3][3] = { {1.0, 0, 0}, {0, 1.0, 0}, {0, 0, 1.0} }; - return rtengine::ICCStore::createFromMatrix (mat, false, "XYZ"); + return ICCStore::createFromMatrix (mat, false, "XYZ"); } const double (*wprofiles[])[3] = {xyz_sRGB, xyz_adobe, xyz_prophoto, xyz_widegamut, xyz_bruce, xyz_beta, xyz_best, xyz_rec2020}; @@ -164,7 +165,7 @@ std::vector getWorkingProfiles () return res; } -std::vector ICCStore::getProfiles () const +std::vector ICCStore::getProfiles (const bool onlyRgb) const { MyMutex::MyLock lock(mutex_); @@ -172,6 +173,7 @@ std::vector ICCStore::getProfiles () const std::vector res; for (ProfileMap::const_iterator profile = fileProfiles.begin (); profile != fileProfiles.end (); ++profile) { + if (!onlyRgb || (onlyRgb && cmsGetColorSpace (profile->second) == cmsSigRgbData)) res.push_back (profile->first); } @@ -187,8 +189,8 @@ std::vector ICCStore::getProfilesFromDir (const Glib::ustring& di ProfileMap profiles; - loadProfiles (profilesDir, &profiles, NULL, NULL, false, true); - loadProfiles (dirName, &profiles, NULL, NULL, false, true); + loadProfiles (profilesDir, &profiles, nullptr, nullptr, false); + loadProfiles (dirName, &profiles, nullptr, nullptr, false); for (ProfileMap::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile) { res.push_back (profile->first); @@ -201,14 +203,14 @@ cmsHPROFILE ICCStore::makeStdGammaProfile (cmsHPROFILE iprof) { // forgive me for the messy code, quick hack to change gamma of an ICC profile to the RT standard gamma if (!iprof) { - return NULL; + return nullptr; } cmsUInt32Number bytesNeeded = 0; - cmsSaveProfileToMem(iprof, 0, &bytesNeeded); + cmsSaveProfileToMem(iprof, nullptr, &bytesNeeded); if (bytesNeeded == 0) { - return NULL; + return nullptr; } uint8_t *data = new uint8_t[bytesNeeded + 1]; @@ -362,6 +364,312 @@ cmsHPROFILE ICCStore::workingSpaceGamma (const Glib::ustring& name) const } } +void ICCStore::getGammaArray(const procparams::ColorManagementParams &icm, GammaValues &ga) +{ + const double eps = 0.000000001; // not divide by zero + if (!icm.freegamma) {//if Free gamma not selected + // gamma : ga[0],ga[1],ga[2],ga[3],ga[4],ga[5] by calcul + if(icm.gamma == "BT709_g2.2_s4.5") { + ga[0] = 2.22; //BT709 2.2 4.5 - my preferred as D.Coffin + ga[1] = 0.909995; + ga[2] = 0.090005; + ga[3] = 0.222222; + ga[4] = 0.081071; + } else if (icm.gamma == "sRGB_g2.4_s12.92") { + ga[0] = 2.40; //sRGB 2.4 12.92 - RT default as Lightroom + ga[1] = 0.947858; + ga[2] = 0.052142; + ga[3] = 0.077399; + ga[4] = 0.039293; + } else if (icm.gamma == "High_g1.3_s3.35") { + ga[0] = 1.3 ; //for high dynamic images + ga[1] = 0.998279; + ga[2] = 0.001721; + ga[3] = 0.298507; + ga[4] = 0.005746; + } else if (icm.gamma == "Low_g2.6_s6.9") { + ga[0] = 2.6 ; //gamma 2.6 variable : for low contrast images + ga[1] = 0.891161; + ga[2] = 0.108839; + ga[3] = 0.144928; + ga[4] = 0.076332; + } else if (icm.gamma == "standard_g2.2") { + ga[0] = 2.2; //gamma=2.2 (as gamma of Adobe, Widegamut...) + ga[1] = 1.; + ga[2] = 0.; + ga[3] = 1. / eps; + ga[4] = 0.; + } else if (icm.gamma == "standard_g1.8") { + ga[0] = 1.8; //gamma=1.8 (as gamma of Prophoto) + ga[1] = 1.; + ga[2] = 0.; + ga[3] = 1. / eps; + ga[4] = 0.; + } else /* if (icm.gamma == "linear_g1.0") */ { + ga[0] = 1.0; //gamma=1 linear : for high dynamic images (cf : D.Coffin...) + ga[1] = 1.; + ga[2] = 0.; + ga[3] = 1. / eps; + ga[4] = 0.; + } + ga[5] = 0.0; + ga[6] = 0.0; + } else { //free gamma selected + GammaValues g_a; //gamma parameters + double pwr = 1.0 / icm.gampos; + double ts = icm.slpos; + double slope = icm.slpos == 0 ? eps : icm.slpos; + + int mode = 0, imax = 0; + Color::calcGamma(pwr, ts, mode, imax, g_a); // call to calcGamma with selected gamma and slope : return parameters for LCMS2 + ga[4] = g_a[3] * ts; + //printf("g_a.gamma0=%f g_a.gamma1=%f g_a.gamma2=%f g_a.gamma3=%f g_a.gamma4=%f\n", g_a.gamma0,g_a.gamma1,g_a.gamma2,g_a.gamma3,g_a.gamma4); + ga[0] = icm.gampos; + ga[1] = 1. / (1.0 + g_a[4]); + ga[2] = g_a[4] / (1.0 + g_a[4]); + ga[3] = 1. / slope; + ga[5] = 0.0; + ga[6] = 0.0; + //printf("ga[0]=%f ga[1]=%f ga[2]=%f ga[3]=%f ga[4]=%f\n", ga[0],ga[1],ga[2],ga[3],ga[4]); + } +} + +// WARNING: the caller must lock lcmsMutex +cmsHPROFILE ICCStore::createGammaProfile (const procparams::ColorManagementParams &icm, GammaValues &ga) { + float p[6]; //primaries + ga[6] = 0.0; + + enum class ColorTemp { + D50 = 5003, // for Widegamut, Prophoto Best, Beta -> D50 + D65 = 6504 // for sRGB, AdobeRGB, Bruce Rec2020 -> D65 + }; + ColorTemp temp = ColorTemp::D50; + + //primaries for 7 working profiles ==> output profiles + // eventually to adapt primaries if RT used special profiles ! + if (icm.output == "WideGamut") { + p[0] = 0.7350; //Widegamut primaries + p[1] = 0.2650; + p[2] = 0.1150; + p[3] = 0.8260; + p[4] = 0.1570; + p[5] = 0.0180; + } else if (icm.output == "Adobe RGB") { + p[0] = 0.6400; //Adobe primaries + p[1] = 0.3300; + p[2] = 0.2100; + p[3] = 0.7100; + p[4] = 0.1500; + p[5] = 0.0600; + temp = ColorTemp::D65; + } else if (icm.output == "sRGB") { + p[0] = 0.6400; // sRGB primaries + p[1] = 0.3300; + p[2] = 0.3000; + p[3] = 0.6000; + p[4] = 0.1500; + p[5] = 0.0600; + temp = ColorTemp::D65; + } else if (icm.output == "BruceRGB") { + p[0] = 0.6400; // Bruce primaries + p[1] = 0.3300; + p[2] = 0.2800; + p[3] = 0.6500; + p[4] = 0.1500; + p[5] = 0.0600; + temp = ColorTemp::D65; + } else if (icm.output == "Beta RGB") { + p[0] = 0.6888; // Beta primaries + p[1] = 0.3112; + p[2] = 0.1986; + p[3] = 0.7551; + p[4] = 0.1265; + p[5] = 0.0352; + } else if (icm.output == "BestRGB") { + p[0] = 0.7347; // Best primaries + p[1] = 0.2653; + p[2] = 0.2150; + p[3] = 0.7750; + p[4] = 0.1300; + p[5] = 0.0350; + } else if (icm.output == "Rec2020") { + p[0] = 0.7080; // Rec2020 primaries + p[1] = 0.2920; + p[2] = 0.1700; + p[3] = 0.7970; + p[4] = 0.1310; + p[5] = 0.0460; + temp = ColorTemp::D65; + } else { + p[0] = 0.7347; //ProPhoto and default primaries + p[1] = 0.2653; + p[2] = 0.1596; + p[3] = 0.8404; + p[4] = 0.0366; + p[5] = 0.0001; + } + + cmsCIExyY xyD; + cmsCIExyYTRIPLE Primaries = { + {p[0], p[1], 1.0}, // red + {p[2], p[3], 1.0}, // green + {p[4], p[5], 1.0} // blue + }; + cmsToneCurve* GammaTRC[3]; + + // 7 parameters for smoother curves + cmsFloat64Number Parameters[7] = { ga[0], ga[1], ga[2], ga[3], ga[4], ga[5], ga[6] } ; + + //lcmsMutex->lock (); Mutex acquired by the caller + cmsWhitePointFromTemp(&xyD, (double)temp); + GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(nullptr, 5, Parameters); //5 = smoother than 4 + cmsHPROFILE oprofdef = cmsCreateRGBProfile(&xyD, &Primaries, GammaTRC); //oprofdef become Outputprofile + cmsFreeToneCurve(GammaTRC[0]); + //lcmsMutex->unlock (); + + return oprofdef; +} + +// WARNING: the caller must lock lcmsMutex +cmsHPROFILE ICCStore::createCustomGammaOutputProfile (const procparams::ColorManagementParams &icm, GammaValues &ga) { + bool pro = false; + Glib::ustring outProfile; + cmsHPROFILE outputProfile = nullptr; + + if (icm.freegamma && icm.gampos < 1.35) { + pro = true; //select profil with gammaTRC modified : + } else if (icm.gamma == "linear_g1.0" || (icm.gamma == "High_g1.3_s3.35")) { + pro = true; //pro=0 RT_sRGB || Prophoto + } + + // Check that output profiles exist, otherwise use LCMS2 + // Use the icc/icm profiles associated to possible working profiles, set in "options" + if (icm.working == "ProPhoto" && iccStore->outputProfileExist(options.rtSettings.prophoto) && !pro) { + outProfile = options.rtSettings.prophoto; + } else if (icm.working == "Adobe RGB" && iccStore->outputProfileExist(options.rtSettings.adobe) ) { + outProfile = options.rtSettings.adobe; + } else if (icm.working == "WideGamut" && iccStore->outputProfileExist(options.rtSettings.widegamut) ) { + outProfile = options.rtSettings.widegamut; + } else if (icm.working == "Beta RGB" && iccStore->outputProfileExist(options.rtSettings.beta) ) { + outProfile = options.rtSettings.beta; + } else if (icm.working == "BestRGB" && iccStore->outputProfileExist(options.rtSettings.best) ) { + outProfile = options.rtSettings.best; + } else if (icm.working == "BruceRGB" && iccStore->outputProfileExist(options.rtSettings.bruce) ) { + outProfile = options.rtSettings.bruce; + } else if (icm.working == "sRGB" && iccStore->outputProfileExist(options.rtSettings.srgb) && !pro) { + outProfile = options.rtSettings.srgb; + } else if (icm.working == "sRGB" && iccStore->outputProfileExist(options.rtSettings.srgb10) && pro) { + outProfile = options.rtSettings.srgb10; + } else if (icm.working == "ProPhoto" && iccStore->outputProfileExist(options.rtSettings.prophoto10) && pro) { + outProfile = options.rtSettings.prophoto10; + } else if (icm.working == "Rec2020" && iccStore->outputProfileExist(options.rtSettings.rec2020) ) { + outProfile = options.rtSettings.rec2020; + } else { + // Should not occurs + if (settings->verbose) { + printf("\"%s\": unknown working profile! - use LCMS2 substitution\n", icm.working.c_str() ); + } + + return nullptr; + } + + //begin adaptation rTRC gTRC bTRC + //"outputProfile" profile has the same characteristics than RGB values, but TRC are adapted... for applying profile + if (settings->verbose) { + printf("Output Gamma - profile: \"%s\"\n", outProfile.c_str() ); //c_str() + } + + outputProfile = iccStore->getProfile(outProfile); //get output profile + + if (outputProfile == nullptr) { + + if (settings->verbose) { + printf("\"%s\" ICC output profile not found!\n", outProfile.c_str()); + } + return nullptr; + } + + // 7 parameters for smoother curves + cmsFloat64Number Parameters[7] = { ga[0], ga[1], ga[2], ga[3], ga[4], ga[5], ga[6] }; + + //change desc Tag , to "free gamma", or "BT709", etc. + cmsMLU *mlu; + cmsContext ContextID = cmsGetProfileContextID(outputProfile); // create context to modify some TAGs + mlu = cmsMLUalloc(ContextID, 1); + + // instruction with //ICC are used to generate ICC profile + if (mlu == nullptr) { + printf("Description error\n"); + } else { + + // Description TAG : selection of gamma and Primaries + if (!icm.freegamma) { + std::wstring gammaStr; + + if(icm.gamma == "High_g1.3_s3.35") { + gammaStr = std::wstring(L"GammaTRC: High g=1.3 s=3.35"); + } else if (icm.gamma == "Low_g2.6_s6.9") { + gammaStr = std::wstring(L"GammaTRC: Low g=2.6 s=6.9"); + } else if (icm.gamma == "sRGB_g2.4_s12.92") { + gammaStr = std::wstring(L"GammaTRC: sRGB g=2.4 s=12.92"); + } else if (icm.gamma == "BT709_g2.2_s4.5") { + gammaStr = std::wstring(L"GammaTRC: BT709 g=2.2 s=4.5"); + } else if (icm.gamma == "linear_g1.0") { + gammaStr = std::wstring(L"GammaTRC: Linear g=1.0"); + } else if (icm.gamma == "standard_g2.2") { + gammaStr = std::wstring(L"GammaTRC: g=2.2"); + } else if (icm.gamma == "standard_g1.8") { + gammaStr = std::wstring(L"GammaTRC: g=1.8"); + } + + cmsMLUsetWide(mlu, "en", "US", gammaStr.c_str()); + } else { + // create description with gamma + slope + primaries + std::wostringstream gammaWs; + gammaWs.precision(2); + gammaWs << "Manual GammaTRC: g=" << (float)icm.gampos << " s=" << (float)icm.slpos; + + cmsMLUsetWide(mlu, "en", "US", gammaWs.str().c_str()); + } + + cmsWriteTag(outputProfile, cmsSigProfileDescriptionTag, mlu);//desc changed + + /* + cmsMLUsetWide(mlu, "en", "US", L"General Public License - AdobeRGB compatible");//adapt to profil + cmsWriteTag(outputProfile, cmsSigCopyrightTag, mlu); + + cmsMLUsetWide(mlu, "en", "US", L"RawTherapee"); + cmsWriteTag(outputProfile, cmsSigDeviceMfgDescTag, mlu); + + cmsMLUsetWide(mlu, "en", "US", L"RTMedium"); //adapt to profil + cmsWriteTag(outputProfile, cmsSigDeviceModelDescTag, mlu); + + */ + + cmsMLUfree (mlu); + } + + // Calculate output profile's rTRC gTRC bTRC + cmsToneCurve* GammaTRC = nullptr; + GammaTRC = cmsBuildParametricToneCurve(nullptr, 5, Parameters); + cmsWriteTag(outputProfile, cmsSigRedTRCTag, (void*)GammaTRC ); + cmsWriteTag(outputProfile, cmsSigGreenTRCTag, (void*)GammaTRC ); + cmsWriteTag(outputProfile, cmsSigBlueTRCTag, (void*)GammaTRC ); + + if (GammaTRC) { + cmsFreeToneCurve(GammaTRC); + } + + return outputProfile; +} + +bool ICCStore::outputProfileExist (const Glib::ustring& name) const +{ + + MyMutex::MyLock lock(mutex_); + return fileProfiles.find(name) != fileProfiles.end(); +} + cmsHPROFILE ICCStore::getProfile (const Glib::ustring& name) const { @@ -407,7 +715,7 @@ cmsHPROFILE ICCStore::getStdProfile (const Glib::ustring& name) const // profile does not exist if (f == fileStdProfilesFileNames.end ()) { - return NULL; + return nullptr; } // but there exists one => load it @@ -433,21 +741,21 @@ ProfileContent ICCStore::getContent (const Glib::ustring& name) const return r != fileProfileContents.end () ? r->second : ProfileContent(); } -std::uint8_t ICCStore::getInputIntents (cmsHPROFILE profile) const +uint8_t ICCStore::getInputIntents (cmsHPROFILE profile) const { MyMutex::MyLock lock (mutex_); return getSupportedIntents (profile, LCMS_USED_AS_INPUT); } -std::uint8_t ICCStore::getOutputIntents (cmsHPROFILE profile) const +uint8_t ICCStore::getOutputIntents (cmsHPROFILE profile) const { MyMutex::MyLock lock (mutex_); return getSupportedIntents (profile, LCMS_USED_AS_OUTPUT); } -std::uint8_t ICCStore::getProofIntents (cmsHPROFILE profile) const +uint8_t ICCStore::getProofIntents (cmsHPROFILE profile) const { MyMutex::MyLock lock (mutex_); @@ -464,15 +772,15 @@ void ICCStore::init (const Glib::ustring& usrICCDir, const Glib::ustring& rtICCD profilesDir = Glib::build_filename (rtICCDir, "output"); fileProfiles.clear(); fileProfileContents.clear(); - loadProfiles (profilesDir, &fileProfiles, &fileProfileContents, NULL, false, true); - loadProfiles (usrICCDir, &fileProfiles, &fileProfileContents, NULL, false, true); + loadProfiles (profilesDir, &fileProfiles, &fileProfileContents, nullptr, false); + loadProfiles (usrICCDir, &fileProfiles, &fileProfileContents, nullptr, false); // Input profiles // Load these to different areas, since the short name (e.g. "NIKON D700" may overlap between system/user and RT dir) stdProfilesDir = Glib::build_filename (rtICCDir, "input"); fileStdProfiles.clear(); fileStdProfilesFileNames.clear(); - loadProfiles (stdProfilesDir, NULL, NULL, &fileStdProfilesFileNames, true, false); + loadProfiles (stdProfilesDir, nullptr, nullptr, &fileStdProfilesFileNames, true); } // Determine the first monitor default profile of operating system, if selected @@ -515,7 +823,7 @@ void ICCStore::findDefaultMonitorProfile () } } -ProfileContent::ProfileContent (const Glib::ustring& fileName) : data(NULL), length(0) +ProfileContent::ProfileContent (const Glib::ustring& fileName) : data(nullptr), length(0) { FILE* f = g_fopen (fileName.c_str (), "rb"); @@ -542,16 +850,16 @@ ProfileContent::ProfileContent (const ProfileContent& other) data = new char[length + 1]; memcpy (data, other.data, length + 1); } else { - data = NULL; + data = nullptr; } } -ProfileContent::ProfileContent (cmsHPROFILE hProfile) : data(NULL), length(0) +ProfileContent::ProfileContent (cmsHPROFILE hProfile) : data(nullptr), length(0) { - if (hProfile != NULL) { + if (hProfile != nullptr) { cmsUInt32Number bytesNeeded = 0; - cmsSaveProfileToMem(hProfile, 0, &bytesNeeded); + cmsSaveProfileToMem(hProfile, nullptr, &bytesNeeded); if (bytesNeeded > 0) { data = new char[bytesNeeded + 1]; @@ -573,7 +881,7 @@ ProfileContent& ProfileContent::operator= (const ProfileContent& other) data = new char[length + 1]; memcpy (data, other.data, length + 1); } else { - data = NULL; + data = nullptr; } return *this; @@ -585,7 +893,7 @@ cmsHPROFILE ProfileContent::toProfile () const if (data) { return cmsOpenProfileFromMem (data, length); } else { - return NULL; + return nullptr; } } diff --git a/rtengine/iccstore.h b/rtengine/iccstore.h index 8b6e6465c..bb9693f1a 100644 --- a/rtengine/iccstore.h +++ b/rtengine/iccstore.h @@ -23,6 +23,9 @@ #include #include #include +#include +#include "procparams.h" +#include "color.h" #include "../rtgui/threadutils.h" namespace rtengine @@ -43,8 +46,8 @@ public: ProfileContent (const ProfileContent& other); ProfileContent& operator= (const rtengine::ProfileContent& other); - ProfileContent (const Glib::ustring& fileName); - ProfileContent (cmsHPROFILE hProfile); + explicit ProfileContent (const Glib::ustring& fileName); + explicit ProfileContent (cmsHPROFILE hProfile); cmsHPROFILE toProfile () const; }; @@ -85,8 +88,11 @@ public: void init (const Glib::ustring& usrICCDir, const Glib::ustring& stdICCDir); + static void getGammaArray(const procparams::ColorManagementParams &icm, GammaValues &ga); static cmsHPROFILE makeStdGammaProfile (cmsHPROFILE iprof); static cmsHPROFILE createFromMatrix (const double matrix[3][3], bool gamma = false, const Glib::ustring& name = Glib::ustring()); + static cmsHPROFILE createGammaProfile (const procparams::ColorManagementParams &icm, GammaValues &ga); + static cmsHPROFILE createCustomGammaOutputProfile (const procparams::ColorManagementParams &icm, GammaValues &ga); // Main monitors standard profile name, from OS void findDefaultMonitorProfile (); @@ -98,29 +104,30 @@ public: TMatrix workingSpaceMatrix (const Glib::ustring& name) const; TMatrix workingSpaceInverseMatrix (const Glib::ustring& name) const; - cmsHPROFILE getProfile (const Glib::ustring& name) const; - cmsHPROFILE getStdProfile (const Glib::ustring& name) const; - ProfileContent getContent (const Glib::ustring& name) const; + bool outputProfileExist (const Glib::ustring& name) const; + cmsHPROFILE getProfile (const Glib::ustring& name) const; + cmsHPROFILE getStdProfile (const Glib::ustring& name) const; + ProfileContent getContent (const Glib::ustring& name) const; cmsHPROFILE getXYZProfile () const; cmsHPROFILE getsRGBProfile () const; - std::vector getProfiles () const; + std::vector getProfiles (const bool onlyRgb = false) const; std::vector getProfilesFromDir (const Glib::ustring& dirName) const; - std::uint8_t getInputIntents (cmsHPROFILE profile) const; - std::uint8_t getOutputIntents (cmsHPROFILE profile) const; - std::uint8_t getProofIntents (cmsHPROFILE profile) const; + uint8_t getInputIntents (cmsHPROFILE profile) const; + uint8_t getOutputIntents (cmsHPROFILE profile) const; + uint8_t getProofIntents (cmsHPROFILE profile) const; - std::uint8_t getInputIntents (const Glib::ustring& name) const; - std::uint8_t getOutputIntents (const Glib::ustring& name) const; - std::uint8_t getProofIntents (const Glib::ustring& name) const; + uint8_t getInputIntents (const Glib::ustring& name) const; + uint8_t getOutputIntents (const Glib::ustring& name) const; + uint8_t getProofIntents (const Glib::ustring& name) const; }; #define iccStore ICCStore::getInstance() inline ProfileContent::ProfileContent () : - data(NULL), + data(nullptr), length(0) { } @@ -140,17 +147,17 @@ inline Glib::ustring ICCStore::getDefaultMonitorProfileName () const return defaultMonitorProfile; } -inline std::uint8_t ICCStore::getInputIntents (const Glib::ustring &name) const +inline uint8_t ICCStore::getInputIntents (const Glib::ustring &name) const { return getInputIntents (getProfile (name)); } -inline std::uint8_t ICCStore::getOutputIntents (const Glib::ustring &name) const +inline uint8_t ICCStore::getOutputIntents (const Glib::ustring &name) const { return getOutputIntents (getProfile (name)); } -inline std::uint8_t ICCStore::getProofIntents (const Glib::ustring &name) const +inline uint8_t ICCStore::getProofIntents (const Glib::ustring &name) const { return getProofIntents (getProfile (name)); } diff --git a/rtengine/iimage.h b/rtengine/iimage.h index 932f55ee7..ad053ee08 100644 --- a/rtengine/iimage.h +++ b/rtengine/iimage.h @@ -144,7 +144,7 @@ public: #if CHECK_BOUNDS PlanarPtr() : width_(0), height_(0), ptrs (NULL) {} #else - PlanarPtr() : ptrs (NULL) {} + PlanarPtr() : ptrs (nullptr) {} #endif bool resize(int newSize) @@ -153,7 +153,7 @@ public: ptrs = ab.data; return true; } else { - ptrs = NULL; + ptrs = nullptr; return false; } } @@ -219,8 +219,8 @@ public: T* data; PlanarPtr v; // v stands for "value", whatever it represent - PlanarWhateverData() : rowstride(0), data (NULL) {} - PlanarWhateverData(int w, int h) : rowstride(0), data (NULL) + PlanarWhateverData() : rowstride(0), data (nullptr) {} + PlanarWhateverData(int w, int h) : rowstride(0), data (nullptr) { allocate(w, h); } @@ -291,7 +291,7 @@ public: } else { // asking for a new size of 0 is safe and will free memory, if any! abData.resize(0); - data = NULL; + data = nullptr; v.resize(0); width = height = -1; #if CHECK_BOUNDS @@ -609,8 +609,8 @@ public: PlanarPtr g; PlanarPtr b; - PlanarRGBData() : rowstride(0), planestride(0), data (NULL) {} - PlanarRGBData(int w, int h) : rowstride(0), planestride(0), data (NULL) + PlanarRGBData() : rowstride(0), planestride(0), data (nullptr) {} + PlanarRGBData(int w, int h) : rowstride(0), planestride(0), data (nullptr) { allocate(w, h); } @@ -700,7 +700,7 @@ public: } else { // asking for a new size of 0 is safe and will free memory, if any! abData.resize(0); - data = NULL; + data = nullptr; r.resize(0); g.resize(0); b.resize(0); @@ -728,7 +728,7 @@ public: /** Copy the data to another PlanarRGBData */ void copyData(PlanarRGBData *dest) { - assert (dest != NULL); + assert (dest != nullptr); // Make sure that the size is the same, reallocate if necessary dest->allocate(width, height); @@ -1201,7 +1201,7 @@ public: #if CHECK_BOUNDS ChunkyPtr() : ptr (NULL), width(-1), width_(0), height_(0) {} #else - ChunkyPtr() : ptr (NULL), width(-1) {} + ChunkyPtr() : ptr (nullptr), width(-1) {} #endif void init(T* base, int w = -1) { @@ -1267,8 +1267,8 @@ public: ChunkyPtr g; ChunkyPtr b; - ChunkyRGBData() : data (NULL) {} - ChunkyRGBData(int w, int h) : data (NULL) + ChunkyRGBData() : data (nullptr) {} + ChunkyRGBData(int w, int h) : data (nullptr) { allocate(w, h); } @@ -1335,10 +1335,10 @@ public: g.init(data + 1, width); b.init(data + 2, width); } else { - data = NULL; - r.init(NULL); - g.init(NULL); - b.init(NULL); + data = nullptr; + r.init(nullptr); + g.init(nullptr); + b.init(nullptr); width = height = -1; #if CHECK_BOUNDS r.width_ = r.height_ = -1; @@ -1351,7 +1351,7 @@ public: /** Copy the data to another ChunkyRGBData */ void copyData(ChunkyRGBData *dest) { - assert (dest != NULL); + assert (dest != nullptr); // Make sure that the size is the same, reallocate if necessary dest->allocate(width, height); diff --git a/rtengine/image16.cc b/rtengine/image16.cc index c4bf310bb..e7f836c6b 100644 --- a/rtengine/image16.cc +++ b/rtengine/image16.cc @@ -340,43 +340,48 @@ Image16::tofloat() } // Parallized transformation; create transform with cmsFLAGS_NOCACHE! -void Image16::ExecCMSTransform(cmsHTRANSFORM hTransform) +void Image16::ExecCMSTransform(cmsHTRANSFORM hTransform, const LabImage &labImage, int cx, int cy) { - //cmsDoTransform(hTransform, data, data, planestride); - - // LittleCMS cannot parallelize planar setups -- Hombre: LCMS2.4 can! But it we use this new feature, memory allocation have to be modified too + // LittleCMS cannot parallelize planar Lab float images // so build temporary buffers to allow multi processor execution #ifdef _OPENMP #pragma omp parallel #endif { - AlignedBuffer buffer(width * 3); + AlignedBuffer bufferLab(width * 3); + AlignedBuffer bufferRGB(width * 3); #ifdef _OPENMP #pragma omp for schedule(static) #endif - for (int y = 0; y < height; y++) + for (int y = cy; y < cy + height; y++) { - unsigned short *p = buffer.data, *pR = r(y), *pG = g(y), *pB = b(y); + unsigned short *pRGB, *pR, *pG, *pB; + float *pLab, *pL, *pa, *pb; + + pLab= bufferLab.data; + pL = labImage.L[y] + cx; + pa = labImage.a[y] + cx; + pb = labImage.b[y] + cx; for (int x = 0; x < width; x++) { - *(p++) = *(pR++); - *(p++) = *(pG++); - *(p++) = *(pB++); + *(pLab++) = *(pL++) / 327.68f; + *(pLab++) = *(pa++) / 327.68f; + *(pLab++) = *(pb++) / 327.68f; } - cmsDoTransform (hTransform, buffer.data, buffer.data, width); + cmsDoTransform (hTransform, bufferLab.data, bufferRGB.data, width); - p = buffer.data; - pR = r(y); - pG = g(y); - pB = b(y); + pRGB = bufferRGB.data; + pR = r(y - cy); + pG = g(y - cy); + pB = b(y - cy); for (int x = 0; x < width; x++) { - *(pR++) = *(p++); - *(pG++) = *(p++); - *(pB++) = *(p++); + *(pR++) = *(pRGB++); + *(pG++) = *(pRGB++); + *(pB++) = *(pRGB++); } } // End of parallelization } diff --git a/rtengine/image16.h b/rtengine/image16.h index 975596fac..a220fe221 100644 --- a/rtengine/image16.h +++ b/rtengine/image16.h @@ -57,7 +57,7 @@ public: return 8 * sizeof(unsigned short); } virtual void getScanline (int row, unsigned char* buffer, int bps); - virtual void setScanline (int row, unsigned char* buffer, int bps, float *minValue = NULL, float *maxValue = NULL); + virtual void setScanline (int row, unsigned char* buffer, int bps, float *minValue = nullptr, float *maxValue = nullptr); // functions inherited from IImage16: virtual MyMutex& getMutex () @@ -97,7 +97,7 @@ public: delete this; } - void ExecCMSTransform(cmsHTRANSFORM hTransform); + void ExecCMSTransform(cmsHTRANSFORM hTransform, const LabImage &labImage, int cx, int cy); }; } diff --git a/rtengine/image8.cc b/rtengine/image8.cc index 1070514b3..dfbb555ea 100644 --- a/rtengine/image8.cc +++ b/rtengine/image8.cc @@ -40,7 +40,7 @@ Image8::~Image8 () void Image8::getScanline (int row, unsigned char* buffer, int bps) { - if (data == NULL) { + if (data == nullptr) { return; } @@ -58,7 +58,7 @@ void Image8::getScanline (int row, unsigned char* buffer, int bps) void Image8::setScanline (int row, unsigned char* buffer, int bps, float *minValue, float *maxValue) { - if (data == NULL) { + if (data == nullptr) { return; } diff --git a/rtengine/image8.h b/rtengine/image8.h index 5f7cfea63..49b98ccd2 100644 --- a/rtengine/image8.h +++ b/rtengine/image8.h @@ -51,7 +51,7 @@ public: return 8 * sizeof(unsigned char); } virtual void getScanline (int row, unsigned char* buffer, int bps); - virtual void setScanline (int row, unsigned char* buffer, int bps, float *minValue = NULL, float *maxValue = NULL); + virtual void setScanline (int row, unsigned char* buffer, int bps, float *minValue = nullptr, float *maxValue = nullptr); // functions inherited from IImage*: virtual MyMutex& getMutex () diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index 2622ffcf7..f8e257ddc 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -48,8 +48,8 @@ ImageData::ImageData (Glib::ustring fname, RawMetaDataLocation* ri) : iso_speed( { size_t dotpos = fname.find_last_of ('.'); - root = NULL; - iptc = NULL; + root = nullptr; + iptc = nullptr; if (ri && (ri->exifBase >= 0 || ri->ciffBase >= 0)) { FILE* f = g_fopen (fname.c_str (), "rb"); @@ -205,7 +205,7 @@ void ImageData::extractInfo () orientation = root->getTag ("Orientation")->valueToString (); } - rtexif::TagDirectory* exif = NULL; + rtexif::TagDirectory* exif = nullptr; if (root->getTag ("Exif")) { exif = root->getTag ("Exif")->getDirectory (); @@ -440,6 +440,16 @@ void ImageData::extractInfo () } } } else if (mnote && (!make.compare (0, 6, "PENTAX") || (!make.compare (0, 5, "RICOH") && !model.compare (0, 6, "PENTAX")))) { + // ISO at max value supported, check manufacturer specific + if (iso_speed == 65535 || iso_speed == 0) { + rtexif::Tag* baseIsoTag = mnote->getTag("ISO"); + if (baseIsoTag) { + std::string isoData = baseIsoTag->valueToString(); + if (isoData.size() > 1) { + iso_speed = stoi(isoData); + } + } + } if (mnote->getTag ("LensType")) { lens = mnote->getTag ("LensType")->valueToString (); } @@ -506,7 +516,7 @@ const procparams::IPTCPairs ImageData::getIPTCData () const unsigned char buffer[2100]; for (int i = 0; i < 16; i++) { - IptcDataSet* ds = iptc_data_get_next_dataset (iptc, NULL, IPTC_RECORD_APP_2, strTags[i].tag); + IptcDataSet* ds = iptc_data_get_next_dataset (iptc, nullptr, IPTC_RECORD_APP_2, strTags[i].tag); if (ds) { iptc_dataset_get_data (ds, buffer, 2100); @@ -518,7 +528,7 @@ const procparams::IPTCPairs ImageData::getIPTCData () const } } - IptcDataSet* ds = NULL; + IptcDataSet* ds = nullptr; std::vector keywords; while ((ds = iptc_data_get_next_dataset (iptc, ds, IPTC_RECORD_APP_2, IPTC_TAG_KEYWORDS))) { @@ -527,7 +537,7 @@ const procparams::IPTCPairs ImageData::getIPTCData () const } iptcc["Keywords"] = keywords; - ds = NULL; + ds = nullptr; std::vector suppCategories; while ((ds = iptc_data_get_next_dataset (iptc, ds, IPTC_RECORD_APP_2, IPTC_TAG_SUPPL_CATEGORY))) { @@ -570,7 +580,7 @@ std::string ImageMetaData::expcompToString (double expcomp, bool maskZeroexpcomp char buffer[256]; - if (maskZeroexpcomp == true) { + if (maskZeroexpcomp) { if (expcomp != 0.0) { sprintf (buffer, "%0.2f", expcomp); return buffer; @@ -623,20 +633,20 @@ extern "C" { unsigned int iptc_len; if (!infile) { - return NULL; + return nullptr; } d = iptc_data_new (); if (!d) { - return NULL; + return nullptr; } buf = (unsigned char*)iptc_mem_alloc (d->priv->mem, buf_len); if (!buf) { iptc_data_unref (d); - return NULL; + return nullptr; } len = iptc_jpeg_read_ps3 (infile, buf, buf_len); @@ -659,7 +669,7 @@ extern "C" { failure: iptc_mem_free (d->priv->mem, buf); iptc_data_unref (d); - return NULL; + return nullptr; } } diff --git a/rtengine/imagedata.h b/rtengine/imagedata.h index 9ec3558c1..f28a49a2f 100644 --- a/rtengine/imagedata.h +++ b/rtengine/imagedata.h @@ -54,7 +54,7 @@ protected: public: - ImageData (Glib::ustring fname, RawMetaDataLocation* rml = NULL); + ImageData (Glib::ustring fname, RawMetaDataLocation* rml = nullptr); virtual ~ImageData (); const rtexif::TagDirectory* getExifData () const diff --git a/rtengine/imagefloat.cc b/rtengine/imagefloat.cc index 5920fff85..9a2e6a67f 100644 --- a/rtengine/imagefloat.cc +++ b/rtengine/imagefloat.cc @@ -47,7 +47,7 @@ Imagefloat::~Imagefloat () void Imagefloat::setScanline (int row, unsigned char* buffer, int bps, float *minValue, float *maxValue) { - if (data == NULL) { + if (data == nullptr) { return; } @@ -146,7 +146,7 @@ void Imagefloat::setScanline (int row, unsigned char* buffer, int bps, float *mi void Imagefloat::getScanline (int row, unsigned char* buffer, int bps) { - if (data == NULL) { + if (data == nullptr) { return; } diff --git a/rtengine/imagefloat.h b/rtengine/imagefloat.h index 649799cc2..7aa06d3a3 100644 --- a/rtengine/imagefloat.h +++ b/rtengine/imagefloat.h @@ -61,7 +61,7 @@ public: return 8 * sizeof(float); } virtual void getScanline (int row, unsigned char* buffer, int bps); - virtual void setScanline (int row, unsigned char* buffer, int bps, float *minValue = NULL, float *maxValue = NULL); + virtual void setScanline (int row, unsigned char* buffer, int bps, float *minValue = nullptr, float *maxValue = nullptr); // functions inherited from IImagefloat: virtual MyMutex& getMutex () diff --git a/rtengine/imageio.cc b/rtengine/imageio.cc index a9be4e7e3..e886dabce 100644 --- a/rtengine/imageio.cc +++ b/rtengine/imageio.cc @@ -52,7 +52,7 @@ namespace // Opens a file for binary writing and request exclusive lock (cases were you need "wb" mode plus locking) FILE* g_fopen_withBinaryAndLock(const Glib::ustring& fname) { - FILE* f = NULL; + FILE* f = nullptr; #ifdef WIN32 @@ -91,13 +91,13 @@ Glib::ustring ImageIO::errorMsg[6] = {"Success", "Cannot read file.", "Invalid h // For only copying the raw input data void ImageIO::setMetadata (const rtexif::TagDirectory* eroot) { - if (exifRoot != NULL) { + if (exifRoot != nullptr) { delete exifRoot; - exifRoot = NULL; + exifRoot = nullptr; } if (eroot) { - rtexif::TagDirectory* td = ((rtexif::TagDirectory*)eroot)->clone (NULL); + rtexif::TagDirectory* td = ((rtexif::TagDirectory*)eroot)->clone (nullptr); // make IPTC and XMP pass through td->keepTag(0x83bb); // IPTC @@ -115,18 +115,18 @@ void ImageIO::setMetadata (const rtexif::TagDirectory* eroot, const rtengine::pr exifChange.clear(); exifChange = exif; - if (exifRoot != NULL) { + if (exifRoot != nullptr) { delete exifRoot; - exifRoot = NULL; + exifRoot = nullptr; } if (eroot) { - exifRoot = ((rtexif::TagDirectory*)eroot)->clone (NULL); + exifRoot = ((rtexif::TagDirectory*)eroot)->clone (nullptr); } - if (iptc != NULL) { + if (iptc != nullptr) { iptc_data_free (iptc); - iptc = NULL; + iptc = nullptr; } // build iptc structures for libiptcdata @@ -184,7 +184,7 @@ void ImageIO::setOutputProfile (char* pdata, int plen) profileData = new char [plen]; memcpy (profileData, pdata, plen); } else { - profileData = NULL; + profileData = nullptr; } profileLength = plen; @@ -224,7 +224,7 @@ int ImageIO::getPNGSampleFormat (Glib::ustring fname, IIOSampleFormat &sFormat, } //initializing main structures - png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); + png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!png) { fclose (file); @@ -303,7 +303,7 @@ int ImageIO::loadPNG (Glib::ustring fname) } //initializing main structures - png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); + png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!png) { fclose (file); @@ -331,7 +331,7 @@ int ImageIO::loadPNG (Glib::ustring fname) png_read_info(png, info); - embProfile = NULL; + embProfile = nullptr; //retrieving image information png_uint_32 width, height; @@ -388,7 +388,7 @@ int ImageIO::loadPNG (Glib::ustring fname) for (unsigned int i = 0; i < height; i++) { - png_read_row (png, (png_byte*)row, NULL); + png_read_row (png, (png_byte*)row, nullptr); if (bit_depth == 16) { // convert scanline to host byte order unsigned short* srow = (unsigned short*)row; @@ -405,7 +405,7 @@ int ImageIO::loadPNG (Glib::ustring fname) } } - png_read_end (png, 0); + png_read_end (png, nullptr); png_destroy_read_struct (&png, &info, &end_info); delete [] row; @@ -489,7 +489,7 @@ int ImageIO::loadJPEGFromMemory (const char* buffer, int bufsize) if (hasprofile) { embProfile = cmsOpenProfileFromMem (loadedProfileData, loadedProfileLength); } else { - embProfile = NULL; + embProfile = nullptr; } jpeg_start_decompress(&cinfo); @@ -556,11 +556,13 @@ int ImageIO::loadJPEG (Glib::ustring fname) jpeg_read_header(&cinfo, TRUE); //if JPEG is CMYK, then abort reading - if (cinfo.jpeg_color_space == JCS_CMYK || cinfo.jpeg_color_space == JCS_YCCK || cinfo.jpeg_color_space == JCS_GRAYSCALE) { + if (cinfo.jpeg_color_space == JCS_CMYK || cinfo.jpeg_color_space == JCS_YCCK) { jpeg_destroy_decompress(&cinfo); return IMIO_READERROR; } + cinfo.out_color_space = JCS_RGB; + deleteLoadedProfileData(); loadedProfileDataJpg = true; bool hasprofile = read_icc_profile (&cinfo, (JOCTET**)&loadedProfileData, (unsigned int*)&loadedProfileLength); @@ -568,7 +570,7 @@ int ImageIO::loadJPEG (Glib::ustring fname) if (hasprofile) { embProfile = cmsOpenProfileFromMem (loadedProfileData, loadedProfileLength); } else { - embProfile = NULL; + embProfile = nullptr; } jpeg_start_decompress(&cinfo); @@ -623,7 +625,7 @@ int ImageIO::getTIFFSampleFormat (Glib::ustring fname, IIOSampleFormat &sFormat, TIFF* in = TIFFOpen(fname.c_str(), "r"); #endif - if (in == NULL) { + if (in == nullptr) { return IMIO_CANNOTREADFILE; } @@ -677,8 +679,8 @@ int ImageIO::getTIFFSampleFormat (Glib::ustring fname, IIOSampleFormat &sFormat, TIFFClose(in); - if (photometric == PHOTOMETRIC_RGB) { - if ((samplesperpixel == 3 || samplesperpixel == 4) && sampleformat == SAMPLEFORMAT_UINT) { + if (photometric == PHOTOMETRIC_RGB || photometric == PHOTOMETRIC_MINISBLACK) { + if ((samplesperpixel == 1 || samplesperpixel == 3 || samplesperpixel == 4) && sampleformat == SAMPLEFORMAT_UINT) { if (bitspersample == 8) { sFormat = IIOSF_UNSIGNED_CHAR; return IMIO_SUCCESS; @@ -732,7 +734,7 @@ int ImageIO::loadTIFF (Glib::ustring fname) TIFF* in = TIFFOpen(fname.c_str(), "r"); #endif - if (in == NULL) { + if (in == nullptr) { return IMIO_CANNOTREADFILE; } @@ -771,39 +773,39 @@ int ImageIO::loadTIFF (Glib::ustring fname) * We could use the min/max values set in TIFFTAG_SMINSAMPLEVALUE and * TIFFTAG_SMAXSAMPLEVALUE, but for now, we normalize the image to the * effective minimum and maximum values - * - printf("Informations de \"%s\":\n", fname.c_str()); - uint16 tiffDefaultScale, tiffBaselineExposure, tiffLinearResponseLimit; - if (TIFFGetField(in, TIFFTAG_DEFAULTSCALE, &tiffDefaultScale)) { - printf(" DefaultScale: %d\n", tiffDefaultScale); - } - else - printf(" No DefaultScale value!\n"); - if (TIFFGetField(in, TIFFTAG_BASELINEEXPOSURE, &tiffBaselineExposure)) { - printf(" BaselineExposure: %d\n", tiffBaselineExposure); - } - else - printf(" No BaselineExposure value!\n"); - if (TIFFGetField(in, TIFFTAG_LINEARRESPONSELIMIT, &tiffLinearResponseLimit)) { - printf(" LinearResponseLimit: %d\n", tiffLinearResponseLimit); - } - else - printf(" No LinearResponseLimit value!\n"); + */ + if (options.rtSettings.verbose) { + printf("Informations of \"%s\":\n", fname.c_str()); + uint16 tiffDefaultScale, tiffBaselineExposure, tiffLinearResponseLimit; + if (TIFFGetField(in, TIFFTAG_DEFAULTSCALE, &tiffDefaultScale)) { + printf(" DefaultScale: %d\n", tiffDefaultScale); + } + else + printf(" No DefaultScale value!\n"); + if (TIFFGetField(in, TIFFTAG_BASELINEEXPOSURE, &tiffBaselineExposure)) { + printf(" BaselineExposure: %d\n", tiffBaselineExposure); + } + else + printf(" No BaselineExposure value!\n"); + if (TIFFGetField(in, TIFFTAG_LINEARRESPONSELIMIT, &tiffLinearResponseLimit)) { + printf(" LinearResponseLimit: %d\n", tiffLinearResponseLimit); + } + else + printf(" No LinearResponseLimit value!\n"); - uint16 tiffMinValue, tiffMaxValue; - if (TIFFGetField(in, TIFFTAG_SMINSAMPLEVALUE, &tiffMinValue)) { - printf(" MinValue: %d\n", tiffMinValue); + uint16 tiffMinValue, tiffMaxValue; + if (TIFFGetField(in, TIFFTAG_SMINSAMPLEVALUE, &tiffMinValue)) { + printf(" MinValue: %d\n", tiffMinValue); + } + else + printf(" No minimum value!\n"); + if (TIFFGetField(in, TIFFTAG_SMAXSAMPLEVALUE, &tiffMaxValue)) { + printf(" MaxValue: %d\n\n", tiffMaxValue); + } + else + printf(" No maximum value!\n\n"); + printf(" Those values are not taken into account, the image data are normalized to a [0;1] range\n\n"); } - else - printf(" No minimum value!\n"); - if (TIFFGetField(in, TIFFTAG_SMAXSAMPLEVALUE, &tiffMaxValue)) { - printf(" MaxValue: %d\n\n", tiffMaxValue); - } - else - printf(" No maximum value!\n\n"); - printf("\n"); - */ - char* profdata; deleteLoadedProfileData(); @@ -811,38 +813,16 @@ int ImageIO::loadTIFF (Glib::ustring fname) if (TIFFGetField(in, TIFFTAG_ICCPROFILE, &loadedProfileLength, &profdata)) { embProfile = cmsOpenProfileFromMem (profdata, loadedProfileLength); - - // For 32 bits floating point images, gamma is forced to linear in embedded ICC profiles - if ( sampleFormat & (IIOSF_LOGLUV24 | IIOSF_LOGLUV32 | IIOSF_FLOAT) ) { - // Modifying the gammaTRG tags - cmsWriteTag(embProfile, cmsSigGreenTRCTag, (void*)Color::linearGammaTRC ); - cmsWriteTag(embProfile, cmsSigRedTRCTag, (void*)Color::linearGammaTRC ); - cmsWriteTag(embProfile, cmsSigBlueTRCTag, (void*)Color::linearGammaTRC ); - - // Saving the profile in the memory - cmsUInt32Number bytesNeeded = 0; - cmsSaveProfileToMem(embProfile, 0, &bytesNeeded); - - if (bytesNeeded > 0) { - loadedProfileData = new char[bytesNeeded + 1]; - cmsSaveProfileToMem(embProfile, loadedProfileData, &bytesNeeded); - } - - loadedProfileLength = (int)bytesNeeded; - } else { - // Saving the profile in the memory as is - loadedProfileData = new char [loadedProfileLength]; - memcpy (loadedProfileData, profdata, loadedProfileLength); - } - + loadedProfileData = new char [loadedProfileLength]; + memcpy (loadedProfileData, profdata, loadedProfileLength); } else { - embProfile = NULL; + embProfile = nullptr; } allocate (width, height); float minValue[3] = {0.f, 0.f, 0.f}, maxValue[3] = {0.f, 0.f, 0.f}; - unsigned char* linebuffer = new unsigned char[TIFFScanlineSize(in)]; + unsigned char* linebuffer = new unsigned char[TIFFScanlineSize(in) * (samplesperpixel == 1 ? 3 : 1)]; for (int row = 0; row < height; row++) { if (TIFFReadScanline(in, linebuffer, row, 0) < 0) { @@ -851,15 +831,26 @@ int ImageIO::loadTIFF (Glib::ustring fname) return IMIO_READERROR; } - if (samplesperpixel > 3) + if (samplesperpixel > 3) { for (int i = 0; i < width; i++) { memcpy (linebuffer + i * 3 * bitspersample / 8, linebuffer + i * samplesperpixel * bitspersample / 8, 3 * bitspersample / 8); } + } + else if (samplesperpixel == 1) { + const size_t bytes = bitspersample / 8; + for (int i = width - 1; i >= 0; --i) { + const unsigned char* const src = linebuffer + i * bytes; + unsigned char* const dest = linebuffer + i * 3 * bytes; + memcpy(dest + 2 * bytes, src, bytes); + memcpy(dest + 1 * bytes, src, bytes); + memcpy(dest + 0 * bytes, src, bytes); + } + } if (sampleFormat & (IIOSF_LOGLUV24 | IIOSF_LOGLUV32 | IIOSF_FLOAT)) { setScanline (row, linebuffer, bitspersample, minValue, maxValue); } else { - setScanline (row, linebuffer, bitspersample, NULL, NULL); + setScanline (row, linebuffer, bitspersample, nullptr, nullptr); } if (pl && !(row % 100)) { @@ -930,7 +921,7 @@ int ImageIO::savePNG (Glib::ustring fname, int compression, volatile int bps) pl->setProgress (0.0); } - png_structp png = png_create_write_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); + png_structp png = png_create_write_struct (PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); if (!png) { fclose (file); @@ -940,7 +931,7 @@ int ImageIO::savePNG (Glib::ustring fname, int compression, volatile int bps) png_infop info = png_create_info_struct(png); if (!info) { - png_destroy_write_struct (&png, 0); + png_destroy_write_struct (&png, nullptr); fclose (file); return IMIO_HEADERERROR; } @@ -1123,7 +1114,7 @@ int ImageIO::saveJPEG (Glib::ustring fname, int quality, int subSamp) int bytes = 0; - if (!error && (bytes = iptc_jpeg_ps3_save_iptc (NULL, 0, iptcdata, size, buffer, 65532)) < 0) { + if (!error && (bytes = iptc_jpeg_ps3_save_iptc (nullptr, 0, iptcdata, size, buffer, 65532)) < 0) { if (iptcdata) { iptc_data_free_buf (iptc, iptcdata); } @@ -1329,23 +1320,23 @@ int ImageIO::saveTIFF (Glib::ustring fname, int bps, bool uncompressed) //TODO Even though we are saving EXIF IFD - MakerNote still comes out screwed. - if ((tag = exifRoot->getTag (TIFFTAG_MODEL)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_MODEL)) != nullptr) { TIFFSetField (out, TIFFTAG_MODEL, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_MAKE)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_MAKE)) != nullptr) { TIFFSetField (out, TIFFTAG_MAKE, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_DATETIME)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_DATETIME)) != nullptr) { TIFFSetField (out, TIFFTAG_DATETIME, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_ARTIST)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_ARTIST)) != nullptr) { TIFFSetField (out, TIFFTAG_ARTIST, tag->getValue()); } - if ((tag = exifRoot->getTag (TIFFTAG_COPYRIGHT)) != NULL) { + if ((tag = exifRoot->getTag (TIFFTAG_COPYRIGHT)) != nullptr) { TIFFSetField (out, TIFFTAG_COPYRIGHT, tag->getValue()); } @@ -1442,7 +1433,7 @@ void png_flush(png_structp png_ptr) FILE *io_ptr; io_ptr = (FILE *)(png_get_io_ptr(png_ptr)); - if (io_ptr != NULL) { + if (io_ptr != nullptr) { fflush(io_ptr); } } diff --git a/rtengine/imageio.h b/rtengine/imageio.h index fc53d6cf4..f00e05b9a 100644 --- a/rtengine/imageio.h +++ b/rtengine/imageio.h @@ -97,13 +97,13 @@ private: } } - loadedProfileData = NULL; + loadedProfileData = nullptr; } public: static Glib::ustring errorMsg[6]; - ImageIO () : pl (NULL), embProfile(NULL), profileData(NULL), profileLength(0), loadedProfileData(NULL), loadedProfileDataJpg(false), - loadedProfileLength(0), iptc(NULL), exifRoot (NULL), sampleFormat(IIOSF_UNKNOWN), + ImageIO () : pl (nullptr), embProfile(nullptr), profileData(nullptr), profileLength(0), loadedProfileData(nullptr), loadedProfileDataJpg(false), + loadedProfileLength(0), iptc(nullptr), exifRoot (nullptr), sampleFormat(IIOSF_UNKNOWN), sampleArrangement(IIOSA_UNKNOWN) {} virtual ~ImageIO (); @@ -137,7 +137,7 @@ public: virtual int getBPS () = 0; virtual void getScanline (int row, unsigned char* buffer, int bps) {} - virtual void setScanline (int row, unsigned char* buffer, int bps, float minValue[3] = NULL, float maxValue[3] = NULL) {} + virtual void setScanline (int row, unsigned char* buffer, int bps, float minValue[3] = nullptr, float maxValue[3] = nullptr) {} virtual bool readImage (Glib::ustring &fname, FILE *fh) { diff --git a/rtengine/imagesource.h b/rtengine/imagesource.h index 305c67da5..59d46035b 100644 --- a/rtengine/imagesource.h +++ b/rtengine/imagesource.h @@ -41,10 +41,10 @@ class ImageMatrices { public: - double rgb_cam[3][3]; - double cam_rgb[3][3]; - double xyz_cam[3][3]; - double cam_xyz[3][3]; + double rgb_cam[3][3] = {}; + double cam_rgb[3][3] = {}; + double xyz_cam[3][3] = {}; + double cam_xyz[3][3] = {}; }; class ImageSource : public InitialImage @@ -63,7 +63,7 @@ protected: public: ImageSource () : references (1), redAWBMul(-1.), greenAWBMul(-1.), blueAWBMul(-1.), - embProfile(NULL), idata(NULL), dirpyrdenoiseExpComp(INFINITY) {} + embProfile(nullptr), idata(nullptr), dirpyrdenoiseExpComp(INFINITY) {} virtual ~ImageSource () {} virtual int load (const Glib::ustring &fname, bool batch = false) = 0; @@ -100,7 +100,7 @@ public: } virtual void getFullSize (int& w, int& h, int tr = TR_NONE) {} - virtual void getSize (int tran, PreviewProps pp, int& w, int& h) {} + virtual void getSize (PreviewProps pp, int& w, int& h) = 0; virtual int getRotateDegree() const { return 0; @@ -111,7 +111,7 @@ public: virtual bool isRAW() const = 0; virtual DCPProfile* getDCP(const ColorManagementParams &cmp, ColorTemp &wb, DCPProfile::ApplyState &as) { - return NULL; + return nullptr; }; virtual void setProgressListener (ProgressListener* pl) {} diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 1b04080c7..fb6ba2db9 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -23,6 +23,7 @@ #include "../rtgui/ppversion.h" #include "colortemp.h" #include "improcfun.h" +#include "iccstore.h" #ifdef _OPENMP #include #endif @@ -32,16 +33,15 @@ namespace rtengine extern const Settings* settings; ImProcCoordinator::ImProcCoordinator () - : orig_prev(NULL), oprevi(NULL), spotprevi(NULL), oprevl(NULL), nprevl(NULL), previmg(NULL), workimg(NULL), - ncie(NULL), imgsrc(NULL), shmap(NULL), lastAwbEqual(0.), ipf(¶ms, true), previewProps(-1, -1, -1, -1, 1), monitorIntent(RI_RELATIVE), scale(10), - highDetailPreprocessComputed(false), highDetailRawComputed(false), allocated(false), - bwAutoR(-9000.f), bwAutoG(-9000.f), bwAutoB(-9000.f), CAMMean(NAN), + : orig_prev(nullptr), oprevi(nullptr), spotprevi(nullptr), oprevl(nullptr), nprevl(nullptr), previmg(nullptr), workimg(nullptr), + ncie(nullptr), imgsrc(nullptr), shmap(nullptr), lastAwbEqual(0.), ipf(¶ms, true), previewProps(-1, -1, -1, -1, 1), monitorIntent(RI_RELATIVE), + softProof(false), gamutCheck(false), scale(10), highDetailPreprocessComputed(false), highDetailRawComputed(false), + allocated(false), bwAutoR(-9000.f), bwAutoG(-9000.f), bwAutoB(-9000.f), CAMMean(NAN), + ctColorCurve(), hltonecurve(65536), shtonecurve(65536), tonecurve(65536, 0), //,1); - chaut(0.f), redaut(0.f), blueaut(0.f), maxredaut(0.f), maxblueaut(0.f), minredaut(0.f), minblueaut(0.f), nresi(0.f), - chromina(0.f), sigma(0.f), lumema(0.f), lumacurve(32770, 0), // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation chroma_acurve(65536, 0), chroma_bcurve(65536, 0), @@ -84,12 +84,12 @@ ImProcCoordinator::ImProcCoordinator () rcurvehist(256), rcurvehistCropped(256), rbeforehist(256), gcurvehist(256), gcurvehistCropped(256), gbeforehist(256), bcurvehist(256), bcurvehistCropped(256), bbeforehist(256), + fw(0), fh(0), tr(0), fullw(1), fullh(1), pW(-1), pH(-1), - plistener(NULL), imageListener(NULL), aeListener(NULL), acListener(NULL), abwListener(NULL), actListener(NULL), adnListener(NULL), awavListener(NULL), dehaListener(NULL), hListener(NULL), - resultValid(false), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false), wavcontlutili(false), - butili(false), ccutili(false), cclutili(false), clcutili(false), opautili(false), conversionBuffer(1, 1) - + plistener(nullptr), imageListener(nullptr), aeListener(nullptr), acListener(nullptr), abwListener(nullptr), actListener(nullptr), adnListener(nullptr), awavListener(nullptr), dehaListener(nullptr), hListener(nullptr), + resultValid(false), lastOutputProfile("BADFOOD"), lastOutputIntent(RI__COUNT), lastOutputBPC(false), thread(nullptr), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false), wavcontlutili(false), + butili(false), ccutili(false), cclutili(false), clcutili(false), opautili(false), conversionBuffer(1, 1), colourToningSatLimit(0.f), colourToningSatLimitOpacity(0.f) {} void ImProcCoordinator::assign (ImageSource* imgsrc) @@ -138,9 +138,6 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) int readyphase = 0; bwAutoR = bwAutoG = bwAutoB = -9000.f; - chaut = redaut = blueaut = maxredaut = maxblueaut = nresi = highresi = 0.f; - chromina = sigma = lumema = 0.f; - minredaut = minblueaut = 10000.f; if (todo == CROP && ipf.needsPCVignetting()) { todo |= TRANSFORM; // Change about Crop does affect TRANSFORM @@ -375,20 +372,22 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // Remove transformation if unneeded bool needstransform = ipf.needsTransform(); - if (!needstransform && orig_prev != oprevi) { + if (!needstransform && !((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) && orig_prev != oprevi) { delete oprevi; spotprevi = oprevi = orig_prev; } - if (needstransform && orig_prev == oprevi) { - spotprevi = oprevi = new Imagefloat (pW, pH); + if ((needstransform || ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled)) ) { + if(!oprevi || oprevi == orig_prev) + spotprevi = oprevi = new Imagefloat (pW, pH); + if (needstransform) + ipf.transform (orig_prev, oprevi, 0, 0, 0, 0, pW, pH, fw, fh, imgsrc->getMetaData()->getFocalLen(), + imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), imgsrc->getRotateDegree(), false); + else + orig_prev->copyData(oprevi); } - if ((todo & M_TRANSFORM) && needstransform) - ipf.transform (orig_prev, oprevi, 0, 0, 0, 0, pW, pH, fw, fh, imgsrc->getMetaData()->getFocalLen(), - imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), imgsrc->getRotateDegree(), false); - - if ((todo & (M_TRANSFORM)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) { + if ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) { const int W = oprevi->getWidth(); const int H = oprevi->getHeight(); LabImage labcbdl(W, H); @@ -461,11 +460,11 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, params.toneCurve.shcompr, params.toneCurve.brightness, params.toneCurve.contrast, params.toneCurve.curveMode, params.toneCurve.curve, params.toneCurve.curveMode2, params.toneCurve.curve2, - vhist16, hltonecurve, shtonecurve, tonecurve, histToneCurve, customToneCurve1, customToneCurve2, scale == 1 ? 1 : 1); + vhist16, hltonecurve, shtonecurve, tonecurve, histToneCurve, customToneCurve1, customToneCurve2, 1); - CurveFactory::RGBCurve (params.rgbCurves.rcurve, rCurve, /*scale==1 ? 1 :*/ 1); - CurveFactory::RGBCurve (params.rgbCurves.gcurve, gCurve, /*scale==1 ? 1 :*/ 1); - CurveFactory::RGBCurve (params.rgbCurves.bcurve, bCurve, /*scale==1 ? 1 :*/ 1); + CurveFactory::RGBCurve (params.rgbCurves.rcurve, rCurve, 1); + CurveFactory::RGBCurve (params.rgbCurves.gcurve, gCurve, 1); + CurveFactory::RGBCurve (params.rgbCurves.bcurve, bCurve, 1); opautili = false; @@ -489,7 +488,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } if(params.blackwhite.enabled) { - CurveFactory::curveBW (params.blackwhite.beforeCurve, params.blackwhite.afterCurve, vhist16bw, histToneCurveBW, beforeToneCurveBW, afterToneCurveBW, scale == 1 ? 1 : 1); + CurveFactory::curveBW (params.blackwhite.beforeCurve, params.blackwhite.afterCurve, vhist16bw, histToneCurveBW, beforeToneCurveBW, afterToneCurveBW, 1); } colourToningSatLimit = float(params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; @@ -557,8 +556,8 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) DCPProfile::ApplyState as; DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); - ipf.rgbProc (spotprevi, oprevl, NULL, hltonecurve, shtonecurve, tonecurve, shmap, params.toneCurve.saturation, - rCurve, gCurve, bCurve, colourToningSatLimit , colourToningSatLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params.toneCurve.expcomp, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, dcpProf, as); + ipf.rgbProc (spotprevi, oprevl, nullptr, hltonecurve, shtonecurve, tonecurve, shmap, params.toneCurve.saturation, + rCurve, gCurve, bCurve, colourToningSatLimit , colourToningSatLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params.toneCurve.expcomp, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, dcpProf, as, histToneCurve); if(params.blackwhite.enabled && params.blackwhite.autoc && abwListener) { if (settings->verbose) { @@ -629,7 +628,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // ipf.MSR(nprevl, nprevl->W, nprevl->H, 1); histCCurve.clear(); histLCurve.clear(); - ipf.chromiLuminanceCurve (NULL, pW, nprevl, nprevl, chroma_acurve, chroma_bcurve, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, histCCurve, histLCurve); + ipf.chromiLuminanceCurve (nullptr, pW, nprevl, nprevl, chroma_acurve, chroma_bcurve, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, histCCurve, histLCurve); ipf.vibrance(nprevl); if((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { @@ -783,7 +782,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) delete ncie; } - ncie = NULL; + ncie = nullptr; if (CAMBrightCurveJ) { CAMBrightCurveJ.reset(); @@ -796,8 +795,11 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } // Update the monitor color transform if necessary - if (todo & M_MONITOR) { - ipf.updateColorProfiles(params.icm, monitorProfile, monitorIntent); + if ((todo & M_MONITOR) || (lastOutputProfile!=params.icm.output) || lastOutputIntent!=params.icm.outputIntent || lastOutputBPC!=params.icm.outputBPC) { + lastOutputProfile = params.icm.output; + lastOutputIntent = params.icm.outputIntent; + lastOutputBPC = params.icm.outputBPC; + ipf.updateColorProfiles(params.icm, monitorProfile, monitorIntent, softProof, gamutCheck); } // process crop, if needed @@ -812,20 +814,12 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) MyMutex::MyLock prevImgLock(previmg->getMutex()); try { + // Computing the preview image, i.e. converting from WCS->Monitor color space (soft-proofing disabled) or WCS->Output profile->Monitor color space (soft-proofing enabled) ipf.lab2monitorRgb (nprevl, previmg); + + // Computing the internal image for analysis, i.e. conversion from WCS->Output profile delete workimg; - Glib::ustring outProfile = params.icm.output; - - if(settings->HistogramWorking) { - Glib::ustring workProfile = params.icm.working; - workimg = ipf.lab2rgb (nprevl, 0, 0, pW, pH, workProfile, RI_RELATIVE, true); // HOMBRE: was RELATIVE by default in lab2rgb, is it safe to assume we have to use it again ? - } else { - if (params.icm.output.empty() || params.icm.output == ColorManagementParams::NoICMString) { - outProfile = "sRGB"; - } - - workimg = ipf.lab2rgb (nprevl, 0, 0, pW, pH, outProfile, params.icm.outputIntent, false); - } + workimg = ipf.lab2rgb (nprevl, 0, 0, pW, pH, params.icm); } catch(char * str) { progress ("Error converting file...", 0); return; @@ -871,18 +865,19 @@ void ImProcCoordinator::freeAll () if (oprevi && oprevi != orig_prev) { delete oprevi; } - oprevi = NULL; + oprevi = nullptr; delete orig_prev; - orig_prev = NULL; + orig_prev = nullptr; delete oprevl; - oprevl = NULL; + oprevl = nullptr; delete nprevl; - nprevl = NULL; + nprevl = nullptr; if (ncie) { delete ncie; } + ncie = NULL; if (imageListener) { @@ -897,7 +892,7 @@ void ImProcCoordinator::freeAll () delete shmap; } - shmap = NULL; + shmap = nullptr; } @@ -927,7 +922,7 @@ void ImProcCoordinator::setScale (int prevscale) do { prevscale--; PreviewProps pp (0, 0, fw, fh, prevscale); - imgsrc->getSize (tr, pp, nW, nH); + imgsrc->getSize (pp, nW, nH); } while(nH < 400 && prevscale > 1 && (nW * nH < 1000000) ); // actually hardcoded values, perhaps a better choice is possible if (settings->verbose) { @@ -1116,7 +1111,7 @@ void ImProcCoordinator::getAutoCrop (double ratio, int &x, int &y, int &w, int & MyMutex::MyLock lock(mProcessing); - LCPMapper *pLCPMap = NULL; + LCPMapper *pLCPMap = nullptr; if (params.lensProf.lcpFile.length() && imgsrc->getMetaData()->getFocalLen() > 0) { LCPProfile *pLCPProf = lcpStore->getProfile(params.lensProf.lcpFile); @@ -1156,6 +1151,18 @@ void ImProcCoordinator::getMonitorProfile (Glib::ustring& profile, RenderingInte intent = monitorIntent; } +void ImProcCoordinator::setSoftProofing (bool softProof, bool gamutCheck) +{ + this->softProof = softProof; + this->gamutCheck = gamutCheck; +} + +void ImProcCoordinator::getSoftProofing (bool &softProof, bool &gamutCheck) +{ + softProof = this->softProof; + gamutCheck = this->gamutCheck; +} + void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool apply_wb) { @@ -1284,7 +1291,7 @@ void ImProcCoordinator::startProcessing () if (!destroying) { if (!updaterRunning) { updaterThreadStart.lock (); - thread = NULL; + thread = nullptr; updaterRunning = true; updaterThreadStart.unlock (); diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index e6ea6dcc3..39be5df4d 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -58,8 +58,8 @@ protected: Imagefloat *spotprevi; LabImage *oprevl; LabImage *nprevl; - Image8 *previmg; - Image8 *workimg; + Image8 *previmg; // displayed image in monitor color space, showing the output profile as well (soft-proofing enabled, which then correspond to workimg) or not + Image8 *workimg; // internal image in output color space for analysis CieImage *ncie; ImageSource* imgsrc; @@ -75,8 +75,9 @@ protected: PreviewProps previewProps; Glib::ustring monitorProfile; - RenderingIntent monitorIntent; + bool softProof; + bool gamutCheck; int scale; bool highDetailPreprocessComputed; @@ -92,7 +93,6 @@ protected: LUTf hltonecurve; LUTf shtonecurve; LUTf tonecurve; - float chaut, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, nresi, highresi, chromina, sigma, lumema; LUTf lumacurve; LUTf chroma_acurve; @@ -176,11 +176,18 @@ protected: void reallocAll (); void updateLRGBHistograms (); void setScale (int prevscale); - void updatePreviewImage (int todo, Crop* cropCall = NULL); + void updatePreviewImage (int todo, Crop* cropCall = nullptr); MyMutex mProcessing; ProcParams params; + // for optimization purpose, the output profile, output rendering intent and + // output BPC will trigger a regeneration of the profile on parameter change only + // and automatically + Glib::ustring lastOutputProfile; + RenderingIntent lastOutputIntent; + bool lastOutputBPC; + // members of the updater: Glib::Thread* thread; MyMutex updaterThreadStart; @@ -258,6 +265,8 @@ public: void setMonitorProfile (const Glib::ustring& profile, RenderingIntent intent); void getMonitorProfile (Glib::ustring& profile, RenderingIntent& intent) const; + void setSoftProofing (bool softProof, bool gamutCheck); + void getSoftProofing (bool &softProof, bool &gamutCheck); bool updateTryLock () { @@ -329,7 +338,7 @@ public: } struct DenoiseInfoStore { - DenoiseInfoStore () : valid(false) {} + DenoiseInfoStore () : chM(0), max_r{}, max_b{}, ch_M{}, valid(false) {} float chM; float max_r[9]; float max_b[9]; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index b832951c3..3e0433197 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -61,14 +61,6 @@ ImProcFunctions::~ImProcFunctions () if (monitorTransform) { cmsDeleteTransform (monitorTransform); } - - if (output2monitorTransform) { - cmsDeleteTransform (output2monitorTransform); - } - - if (lab2outputTransform) { - cmsDeleteTransform (lab2outputTransform); - } } void ImProcFunctions::setScale (double iscale) @@ -76,24 +68,14 @@ void ImProcFunctions::setScale (double iscale) scale = iscale; } -void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, const Glib::ustring& monitorProfile, RenderingIntent monitorIntent) +void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck) { // set up monitor transform if (monitorTransform) { cmsDeleteTransform (monitorTransform); } - if (output2monitorTransform) { - cmsDeleteTransform (output2monitorTransform); - } - - if (lab2outputTransform) { - cmsDeleteTransform (lab2outputTransform); - } - monitorTransform = nullptr; - output2monitorTransform = nullptr; - lab2outputTransform = nullptr; #if !defined(__APPLE__) // No support for monitor profiles on OS X, all data is sRGB @@ -101,20 +83,57 @@ void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, con if (monitor) { MyMutex::MyLock lcmsLock (*lcmsMutex); + + cmsUInt32Number flags; cmsHPROFILE iprof = cmsCreateLab4Profile(nullptr); - monitorTransform = cmsCreateTransform (iprof, TYPE_Lab_FLT, monitor, TYPE_RGB_8, monitorIntent, - cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); // NOCACHE is for thread safety, NOOPTIMIZE for precision - Glib::ustring outputProfile; + bool softProofCreated = false; - if (!icm.output.empty() && icm.output != ColorManagementParams::NoICMString) { - outputProfile = icm.output; - cmsHPROFILE jprof = iccStore->getProfile(outputProfile); - - if (jprof) { - lab2outputTransform = cmsCreateTransform (iprof, TYPE_Lab_FLT, jprof, TYPE_RGB_FLT, icm.outputIntent, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); - output2monitorTransform = cmsCreateTransform (jprof, TYPE_RGB_FLT, monitor, TYPE_RGB_8, monitorIntent, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); + if (softProof) { + cmsHPROFILE oprof = nullptr; + if(icm.gamma != "default" || icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 + GammaValues ga; + iccStore->getGammaArray(icm, ga); + oprof = iccStore->createGammaProfile (icm, ga); } + else if (!icm.output.empty() && icm.output != ColorManagementParams::NoICMString) { + if(icm.gamma != "default" || icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 + GammaValues ga; + iccStore->getGammaArray(icm, ga); + oprof = iccStore->createCustomGammaOutputProfile (icm, ga); + } else { + oprof = iccStore->getProfile(icm.output); + } + } + + if (oprof) { + // NOCACHE is for thread safety, NOOPTIMIZE for precision + flags = cmsFLAGS_SOFTPROOFING | cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE; + if (icm.outputBPC) { + flags |= cmsFLAGS_BLACKPOINTCOMPENSATION; + } + if (gamutCheck) { + flags |= cmsFLAGS_GAMUTCHECK; + } + monitorTransform = cmsCreateProofingTransform( + iprof, TYPE_Lab_FLT, + monitor, TYPE_RGB_8, + oprof, + monitorIntent, icm.outputIntent, + flags + ); + if (monitorTransform) { + softProofCreated = true; + } + } + } + + if (!softProofCreated) { + flags = cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE; + if (settings->monitorBPC) { + flags |= cmsFLAGS_BLACKPOINTCOMPENSATION; + } + monitorTransform = cmsCreateTransform (iprof, TYPE_Lab_FLT, monitor, TYPE_RGB_8, monitorIntent, flags); } cmsCloseProfile(iprof); @@ -280,7 +299,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh } //scene condition for surround - if(params->colorappearance.surrsource == true) { + if(params->colorappearance.surrsource) { f = 0.85; // if user => source image has surround very dark c = 0.55; nc = 0.85; @@ -507,7 +526,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh int gamu = 0; bool highlight = params->toneCurve.hrenabled; //Get the value if "highlight reconstruction" is activated - if(params->colorappearance.gamut == true) { + if(params->colorappearance.gamut) { gamu = 1; //enabled gamut control } @@ -524,7 +543,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh xw2 = xwd; yw2 = ywd; zw2 = zwd; - } else if(params->colorappearance.wbmodel == "RawTCAT02") { + } else /*if(params->colorappearance.wbmodel == "RawTCAT02")*/ { xw1 = xw; // Settings RT WB are used for CAT02 => mix , CAT02 is use for output device (screen: D50 D65, projector: lamp, LED) see preferences yw1 = yw; zw1 = zw; @@ -1034,7 +1053,6 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh // if(!params->epd.enabled || !params->colorappearance.tonecie || !settings->autocielab){ // if(!params->epd.enabled || !params->colorappearance.tonecie || !params->colorappearance.sharpcie){ - int posl, posc; double brli = 327.; double chsacol = 327.; int libr = 0; @@ -1065,9 +1083,10 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh jp = true; if(pW != 1) { //only with improccoordinator + int posl; if(libr == 1) { posl = CLIP((int)(Q * brli)); //40.0 to 100.0 approximative factor for Q - 327 for J - } else if(libr == 0) { + } else /*if(libr == 0)*/ { posl = CLIP((int)(J * brli)); //327 for J } @@ -1077,11 +1096,12 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh chropC = true; if(pW != 1) { //only with improccoordinator + int posc; if(colch == 0) { posc = CLIP((int)(C * chsacol)); //450.0 approximative factor for s 320 for M } else if(colch == 1) { posc = CLIP((int)(s * chsacol)); - } else if(colch == 2) { + } else /*if(colch == 2)*/ { posc = CLIP((int)(M * chsacol)); } @@ -1303,7 +1323,6 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh ncie->C_p[i][j] = (ncie->M_p[i][j]) / co_e; //show histogram in CIECAM mode (Q,J, M,s,C) - int posl, posc; double brli = 327.; double chsacol = 327.; int libr = 0; @@ -1335,9 +1354,10 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh jp = true; if(pW != 1) { //only with improccoordinator + int posl; if(libr == 1) { posl = CLIP((int)(ncie->Q_p[i][j] * brli)); //40.0 to 100.0 approximative factor for Q - 327 for J - } else if(libr == 0) { + } else /*if(libr == 0)*/ { posl = CLIP((int)(ncie->J_p[i][j] * brli)); //327 for J } @@ -1347,12 +1367,13 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh chropC = true; if(pW != 1) { //only with improccoordinator + int posc; if(colch == 0) { posc = CLIP((int)(ncie->C_p[i][j] * chsacol)); //450.0 approximative factor for s 320 for M } else if(colch == 1) { sa_t = 100.f * sqrt(ncie->C_p[i][j] / ncie->Q_p[i][j]); //Q_p always > 0 posc = CLIP((int)(sa_t * chsacol)); - } else if(colch == 2) { + } else /*if(colch == 2)*/ { posc = CLIP((int)(ncie->M_p[i][j] * chsacol)); } @@ -1503,7 +1524,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } //scene condition for surround - if(params->colorappearance.surrsource == true) { + if(params->colorappearance.surrsource) { f = 0.85f; // if user => source image has surround very dark c = 0.55f; nc = 0.85f; @@ -1808,7 +1829,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int const bool highlight = params->toneCurve.hrenabled; //Get the value if "highlight reconstruction" is activated - const int gamu = (params->colorappearance.gamut == true) ? 1 : 0; + const int gamu = (params->colorappearance.gamut) ? 1 : 0; xw = 100.0f * Xw; yw = 100.0f * Yw; zw = 100.0f * Zw; @@ -1822,7 +1843,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int xw2 = xwd; yw2 = ywd; zw2 = zwd; - } else if(params->colorappearance.wbmodel == "RawTCAT02") { + } else /*if(params->colorappearance.wbmodel == "RawTCAT02")*/ { xw1 = xw; // Settings RT WB are used for CAT02 => mix , CAT02 is use for output device (screen: D50 D65, projector: lamp, LED) see preferences yw1 = yw; zw1 = zw; @@ -2680,8 +2701,6 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int for (int i = 0; i < height; i++) { // update CIECAM with new values after tone-mapping for (int j = 0; j < width; j++) { - float xx, yy, zz; - float x, y, z; // if(epdEnabled) ncie->J_p[i][j]=(100.0f* ncie->Q_p[i][j]*ncie->Q_p[i][j])/(w_h*w_h); if(epdEnabled) { @@ -2732,13 +2751,14 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int Cbuffer[j] = ncie_C_p; hbuffer[j] = ncie->h_p[i][j]; #else + float xx, yy, zz; Ciecam02::jch2xyz_ciecam02float( xx, yy, zz, ncie->J_p[i][j], ncie_C_p, ncie->h_p[i][j], xw2, yw2, zw2, f2, c2, nc2, gamu, pow1n, nbbj, ncbj, flj, czj, dj, awj); - x = (float)xx * 655.35f; - y = (float)yy * 655.35f; - z = (float)zz * 655.35f; + float x = (float)xx * 655.35f; + float y = (float)yy * 655.35f; + float z = (float)zz * 655.35f; float Ll, aa, bb; //convert xyz=>lab Color::XYZ2Lab(x, y, z, Ll, aa, bb); @@ -2928,15 +2948,15 @@ filmlike_clip(float *r, float *g, float *b) void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clToningcurve, LUTf & cl2Toningcurve, - const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn ) + const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve ) { - rgbProc (working, lab, pipetteBuffer, hltonecurve, shtonecurve, tonecurve, shmap, sat, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, params->toneCurve.expcomp, params->toneCurve.hlcompr, params->toneCurve.hlcomprthresh, dcpProf, asIn); + rgbProc (working, lab, pipetteBuffer, hltonecurve, shtonecurve, tonecurve, shmap, sat, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, params->toneCurve.expcomp, params->toneCurve.hlcompr, params->toneCurve.hlcomprthresh, dcpProf, asIn, histToneCurve); } // Process RGB image and convert to LAB space void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clToningcurve, LUTf & cl2Toningcurve, - const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, double expcomp, int hlcompr, int hlcomprthresh, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn ) + const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, double expcomp, int hlcompr, int hlcomprthresh, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve ) { BENCHFUN Imagefloat *tmpImage = nullptr; @@ -3010,6 +3030,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer {wprof[2][0], wprof[2][1], wprof[2][2]} }; + // For tonecurve histogram + float lumimulf[3] = {static_cast(lumimul[0]), static_cast(lumimul[1]), static_cast(lumimul[2])}; + bool mixchannels = (params->chmixer.red[0] != 100 || params->chmixer.red[1] != 0 || params->chmixer.red[2] != 0 || params->chmixer.green[0] != 0 || params->chmixer.green[1] != 100 || params->chmixer.green[2] != 0 || @@ -3262,6 +3285,16 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer int W = working->width; int H = working->height; + // For tonecurve histogram + int toneCurveHistSize = histToneCurve ? histToneCurve.getSize() : 0; + int histToneCurveCompression; + + if(toneCurveHistSize > 0) { + histToneCurve.clear(); + histToneCurveCompression = log2(65536 / toneCurveHistSize); + } + + #define TS 112 #ifdef _OPENMP @@ -3305,6 +3338,12 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float out_rgbx[4 * TS] ALIGNED16; // Line buffer for CLUT + LUTu histToneCurveThr; + if(toneCurveHistSize > 0) { + histToneCurveThr(toneCurveHistSize); + histToneCurveThr.clear(); + } + #ifdef _OPENMP #pragma omp for schedule(dynamic) collapse(2) #endif @@ -3453,6 +3492,10 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer rtemp[ti * TS + tj] = tonecurve[ rtemp[ti * TS + tj] ]; gtemp[ti * TS + tj] = tonecurve[ gtemp[ti * TS + tj] ]; btemp[ti * TS + tj] = tonecurve[ btemp[ti * TS + tj] ]; + if(histToneCurveThr) { + int y = CLIP(lumimulf[0] * Color::gamma2curve[rtemp[ti * TS + tj]] + lumimulf[1] * Color::gamma2curve[gtemp[ti * TS + tj]] + lumimulf[2] * Color::gamma2curve[btemp[ti * TS + tj]]); + histToneCurveThr[y>>histToneCurveCompression]++; + } } } @@ -3817,7 +3860,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float reducac = 0.4f; int preser = 0; - if(params->colorToning.lumamode == true) { + if(params->colorToning.lumamode) { preser = 1; } @@ -3878,7 +3921,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer int preser = 0; //bool execbal = params->colorToning.method=="Splitbal"; - if(params->colorToning.lumamode == true) { + if(params->colorToning.lumamode) { preser = 1; } @@ -3935,14 +3978,14 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float iplow, iphigh; - if(twocol == false) { + if(!twocol) { iplow = (float)ctColorCurve.low; iphigh = (float)ctColorCurve.high; } int twoc = 0; //integer instead of bool to let more possible choice...other than 2 and 500. - if (twocol == false) { + if (!twocol) { twoc = 0; // 2 colours } else { twoc = 1; // 500 colours @@ -4378,7 +4421,14 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer if (editWhateverBuffer) { free (editWhateverBuffer); } - +#ifdef _OPENMP +#pragma omp critical +{ + if(toneCurveHistSize > 0) { + histToneCurve += histToneCurveThr; + } +} +#endif // _OPENMP } // starting a new tile processing with a 'reduction' clause for the auto mixer computing @@ -4521,7 +4571,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer */ int preser = 0; - if(params->colorToning.lumamode == true) { + if(params->colorToning.lumamode) { preser = 1; } @@ -4570,7 +4620,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float reducac = 0.4f; int preser = 0; - if(params->colorToning.lumamode == true) { + if(params->colorToning.lumamode) { preser = 1; } @@ -4636,7 +4686,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float iplow, iphigh; - if(twocol == false) { + if(!twocol) { iplow = (float)ctColorCurve.low; iphigh = (float)ctColorCurve.high; @@ -4644,7 +4694,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer int twoc = 0; //integer instead of bool to let more possible choice...other than 2 and 500. - if(twocol == false) { + if(!twocol) { twoc = 0; // 2 colours } else { twoc = 1; // 500 colours @@ -4663,7 +4713,6 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer for (int i = 0; i < tH; i++) { for (int j = 0; j < tW; j++) { - float h, s, l; float r = tmpImage->r(i, j); float g = tmpImage->g(i, j); float b = tmpImage->b(i, j); @@ -6160,8 +6209,8 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu if (settings->verbose) { t2e.set(); printf("Color::AllMunsellLch (correction performed in %d usec):\n", t2e.etime(t1e)); - printf(" Munsell chrominance: MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad dep=%i\n", MunsDebugInfo->maxdhue[0], MunsDebugInfo->maxdhue[1], MunsDebugInfo->maxdhue[2], MunsDebugInfo->maxdhue[3], MunsDebugInfo->depass); - printf(" Munsell luminance : MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad dep=%i\n", MunsDebugInfo->maxdhuelum[0], MunsDebugInfo->maxdhuelum[1], MunsDebugInfo->maxdhuelum[2], MunsDebugInfo->maxdhuelum[3], MunsDebugInfo->depassLum); + printf(" Munsell chrominance: MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad dep=%u\n", MunsDebugInfo->maxdhue[0], MunsDebugInfo->maxdhue[1], MunsDebugInfo->maxdhue[2], MunsDebugInfo->maxdhue[3], MunsDebugInfo->depass); + printf(" Munsell luminance : MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad dep=%u\n", MunsDebugInfo->maxdhuelum[0], MunsDebugInfo->maxdhuelum[1], MunsDebugInfo->maxdhuelum[2], MunsDebugInfo->maxdhuelum[3], MunsDebugInfo->depassLum); } delete MunsDebugInfo; @@ -6375,7 +6424,7 @@ void ImProcFunctions::EPDToneMapCIE(CieImage *ncie, float a_w, float c_, float w Qpro = maxQ; } - EdgePreservingDecomposition epd = EdgePreservingDecomposition(Wid, Hei); + EdgePreservingDecomposition epd(Wid, Hei); #pragma omp parallel for @@ -6479,7 +6528,7 @@ void ImProcFunctions::EPDToneMap(LabImage *lab, unsigned int Iterates, int skip) float *a = lab->a[0]; float *b = lab->b[0]; unsigned int i, N = lab->W * lab->H; - EdgePreservingDecomposition epd = EdgePreservingDecomposition(lab->W, lab->H); + EdgePreservingDecomposition epd(lab->W, lab->H); //Due to the taking of logarithms, L must be nonnegative. Further, scale to 0 to 1 using nominal range of L, 0 to 15 bit. float minL = FLT_MAX; diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index acecc9c1e..a99c59773 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -194,27 +194,9 @@ public: }; double lumimul[3]; -// float chau; -// float chred; -// float chblue; -// float maxchred; -// float maxchblue; -// float minchred; -// float minchblue; -// float resid;//used by noise_residual -// float residred;//used by noise_residual -// float residblue;//used by noise_residual -// int nb; - int nbresid; - float redresid; - float blueresid; -// float maxredresid;//used by noise_residual -// float maxblueresid;//used by noise_residual -// int comptlevel; - ImProcFunctions (const ProcParams* iparams, bool imultiThread = true) - : monitorTransform(NULL), lab2outputTransform(NULL), output2monitorTransform(NULL), params(iparams), scale(1), multiThread(imultiThread) {} + : monitorTransform(nullptr), lab2outputTransform(nullptr), output2monitorTransform(nullptr), params(iparams), scale(1), multiThread(imultiThread), lumimul{} {} ~ImProcFunctions (); void setScale (double iscale); @@ -223,14 +205,14 @@ public: bool needsPCVignetting (); void firstAnalysis (const Imagefloat* const working, const ProcParams ¶ms, LUTu & vhist16); - void updateColorProfiles (const ColorManagementParams& icm, const Glib::ustring& monitorProfile, RenderingIntent monitorIntent); + void updateColorProfiles (const ColorManagementParams& icm, const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck); void rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, - const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn ); + const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve ); void rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, - double expcomp, int hlcompr, int hlcomprthresh, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn ); + double expcomp, int hlcompr, int hlcomprthresh, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve); void labtoning (float r, float g, float b, float &ro, float &go, float &bo, int algm, int metchrom, int twoc, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, LUTf & clToningcurve, LUTf & cl2Toningcurve, float iplow, float iphigh, double wp[3][3], double wip[3][3] ); void toning2col (float r, float g, float b, float &ro, float &go, float &bo, float iplow, float iphigh, float rl, float gl, float bl, float rh, float gh, float bh, float SatLow, float SatHigh, float balanS, float balanH, float reducac, int mode, int preser, float strProtect); void toningsmh (float r, float g, float b, float &ro, float &go, float &bo, float RedLow, float GreenLow, float BlueLow, float RedMed, float GreenMed, float BlueMed, float RedHigh, float GreenHigh, float BlueHigh, float reducac, int mode, int preser, float strProtect); @@ -279,7 +261,7 @@ public: void EPDToneMapResid(float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params& cp, int W_L, int H_L, float max0, float min0); float *CompressDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Compressed); void ContrastResid(float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params &cp, int W_L, int H_L, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx); - float *ContrastDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Contrast = NULL); + float *ContrastDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Contrast = nullptr); void EPDToneMap(LabImage *lab, unsigned int Iterates = 0, int skip = 1); void EPDToneMapCIE(CieImage *ncie, float a_w, float c_, float w_h, int Wid, int Hei, int begh, int endh, float minQ, float maxQ, unsigned int Iterates = 0, int skip = 1); @@ -314,14 +296,14 @@ public: void Aver(float * HH_Coeffs, int datalen, float &averagePlus, float &averageNeg, float &max, float &min); void Sigma(float * HH_Coeffs, int datalen, float averagePlus, float averageNeg, float &sigmaPlus, float &sigmaNeg); - void calckoe(float ** WavCoeffs_LL, const struct cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = NULL); + void calckoe(float ** WavCoeffs_LL, const struct cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = nullptr); - void Median_Denoise( float **src, float **dst, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = NULL); + void Median_Denoise( float **src, float **dst, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = nullptr); void RGB_denoise(int kall, Imagefloat * src, Imagefloat * dst, Imagefloat * calclum, float * ch_M, float *max_r, float *max_b, bool isRAW, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, const NoiseCurve & noiseLCurve , const NoiseCurve & noiseCCurve , float &chaut, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &nresi, float &highresi); void RGB_denoise_infoGamCurve(const procparams::DirPyrDenoiseParams & dnparams, const bool isRAW, LUTf &gamcurve, float &gam, float &gamthresh, float &gamslope); - void RGB_denoise_info(Imagefloat * src, Imagefloat * provicalc, bool isRAW, LUTf &gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &minredaut, float & minblueaut, float &nresi, float &highresi, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, bool multiThread = false); + void RGB_denoise_info(Imagefloat * src, Imagefloat * provicalc, bool isRAW, LUTf &gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &minredaut, float & minblueaut, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, bool multiThread = false); void RGBtile_denoise (float * fLblox, int hblproc, float noisevar_Ldetail, float * nbrwt, float * blurbuffer ); //for DCT void RGBoutput_tile_row (float *bloxrow_L, float ** Ldetail, float ** tilemask_out, int height, int width, int top ); bool WaveletDenoiseAllL(wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3], float * vari, int edge); @@ -335,7 +317,7 @@ public: const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb); void ShrinkAllL(wavelet_decomposition &WaveletCoeffs_L, float **buffer, int level, int dir, float *noisevarlum, float * madL, float * vari, int edge); void ShrinkAllAB(wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float **buffer, int level, int dir, - float *noisevarchrom, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, float * madL, float * madaab = NULL, bool madCalculated = false); + float *noisevarchrom, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, float * madL, float * madaab = nullptr, bool madCalculated = false); void ShrinkAll_info(float ** WavCoeffs_a, float ** WavCoeffs_b, int level, int W_ab, int H_ab, int skip_ab, float **noisevarlum, float **noisevarchrom, float **noisevarhue, int width, int height, float noisevar_abr, float noisevar_abb, LabImage * noi, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float &minblueaut, bool autoch, int schoice, int lvl, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb, bool multiThread); @@ -364,16 +346,15 @@ public: void Badpixelscam(CieImage * src, CieImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom, int hotbad); void BadpixelsLab(LabImage * src, LabImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom); - Image8* lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, bool standard_gamma); - Image16* lab2rgb16b (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, Glib::ustring profi, Glib::ustring gam, bool freegamma, double gampos, double slpos, double &ga0, double &ga1, double &ga2, double &ga3, double &ga4, double &ga5, double &ga6, bool bw);// for gamma output - Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, bool bw);//without gamma ==>default + Image8* lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm); + Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, GammaValues *ga=nullptr); // CieImage *ciec; - bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LCPMapper *pLCPMap = NULL); - bool transCoord (int W, int H, const std::vector &src, std::vector &red, std::vector &green, std::vector &blue, double ascaleDef = -1, const LCPMapper *pLCPMap = NULL); + bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LCPMapper *pLCPMap = nullptr); + bool transCoord (int W, int H, const std::vector &src, std::vector &red, std::vector &green, std::vector &blue, double ascaleDef = -1, const LCPMapper *pLCPMap = nullptr); static void getAutoExp (const LUTu & histogram, int histcompr, double defgain, double clip, double& expcomp, int& bright, int& contr, int& black, int& hlcompr, int& hlcomprthresh); static double getAutoDistor (const Glib::ustring& fname, int thumb_size); - double getTransformAutoFill (int oW, int oH, const LCPMapper *pLCPMap = NULL); + double getTransformAutoFill (int oW, int oH, const LCPMapper *pLCPMap = nullptr); void rgb2lab(const Imagefloat &src, LabImage &dst, const Glib::ustring &workingSpace); void lab2rgb(const LabImage &src, Imagefloat &dst, const Glib::ustring &workingSpace); }; diff --git a/rtengine/init.cc b/rtengine/init.cc index 3b2c5fbdc..27edd976b 100644 --- a/rtengine/init.cc +++ b/rtengine/init.cc @@ -35,7 +35,7 @@ namespace rtengine const Settings* settings; -MyMutex* lcmsMutex = NULL; +MyMutex* lcmsMutex = nullptr; int init (const Settings* s, Glib::ustring baseDir, Glib::ustring userSettingsDir) { diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index 4c2da72a4..218dbf6fe 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -32,6 +32,12 @@ namespace rtengine extern const Settings* settings; +// Used in ImProcCoordinator::updatePreviewImage (rtengine/improccoordinator.cc) +// Crop::update (rtengine/dcrop.cc) +// Thumbnail::processImage (rtengine/rtthumbnail.cc) +// +// If monitorTransform, divide by 327.68 then apply monitorTransform (which can integrate soft-proofing) +// otherwise divide by 327.68, convert to xyz and apply the sRGB transform, before converting with gamma2curve void ImProcFunctions::lab2monitorRgb (LabImage* lab, Image8* image) { if (monitorTransform) { @@ -61,21 +67,13 @@ void ImProcFunctions::lab2monitorRgb (LabImage* lab, Image8* image) float* ra = lab->a[i]; float* rb = lab->b[i]; - float fy, fx, fz, x_, y_, z_, LL; - for (int j = 0; j < W; j++) { buffer[iy++] = rL[j] / 327.68f; buffer[iy++] = ra[j] / 327.68f; buffer[iy++] = rb[j] / 327.68f; } - if (!settings->HistogramWorking && output2monitorTransform && lab2outputTransform) { - AlignedBuffer buf(3 * W); - cmsDoTransform (lab2outputTransform, buffer, buf.data, W); - cmsDoTransform (output2monitorTransform, buf.data, data + ix, W); - } else { - cmsDoTransform (monitorTransform, buffer, data + ix, W); - } + cmsDoTransform (monitorTransform, buffer, data + ix, W); } } // End of parallelization } else { @@ -115,8 +113,18 @@ void ImProcFunctions::lab2monitorRgb (LabImage* lab, Image8* image) } } -Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, bool standard_gamma) + + +// Used in ImProcCoordinator::updatePreviewImage (rtengine/improccoordinator.cc) +// Crop::update (rtengine/dcrop.cc) +// +// Generate an Image8 +// +// If output profile used, divide by 327.68 then apply the "profile" profile (eventually with a standard gamma) +// otherwise divide by 327.68, convert to xyz and apply the RGB transform, before converting with gamma2curve +Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm) { + //gamutmap(lab); if (cx < 0) { cx = 0; @@ -135,9 +143,22 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, } Image8* image = new Image8 (cw, ch); - + Glib::ustring profile; cmsHPROFILE oprof = iccStore->getProfile (profile); + bool standard_gamma; + + if(settings->HistogramWorking) { + profile = icm.working; + standard_gamma = true; + } else { + profile = icm.output; + if (icm.output.empty() || icm.output == ColorManagementParams::NoICMString) { + profile = "sRGB"; + } + standard_gamma = false; + } + if (oprof) { cmsHPROFILE oprofG = oprof; @@ -145,11 +166,14 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, oprofG = ICCStore::makeStdGammaProfile(oprof); } + cmsUInt32Number flags = cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE; + if (icm.outputBPC) { + flags |= cmsFLAGS_BLACKPOINTCOMPENSATION; + } lcmsMutex->lock (); - cmsHPROFILE hLab = cmsCreateLab4Profile(NULL); - cmsHTRANSFORM hTransform = cmsCreateTransform (hLab, TYPE_Lab_DBL, oprofG, TYPE_RGB_8, intent, - cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); // NOCACHE is important for thread safety - cmsCloseProfile(hLab); + cmsHPROFILE LabIProf = cmsCreateLab4Profile(nullptr); + cmsHTRANSFORM hTransform = cmsCreateTransform (LabIProf, TYPE_Lab_DBL, oprofG, TYPE_RGB_8, icm.outputIntent, flags); // NOCACHE is important for thread safety + cmsCloseProfile(LabIProf); lcmsMutex->unlock (); unsigned char *data = image->data; @@ -220,8 +244,24 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, return image; } -// for default (not gamma) -Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, bool bw) + + +/** @brief Convert the final Lab image to the output RGB color space + * + * Used in processImage (rtengine/simpleprocess.cc) + * + * Provide a pointer to a 7 floats array for "ga" (uninitialized ; this array will be filled with the gamma values) if you want + * to use the custom gamma scenario. Thoses gamma values will correspond to the ones of the chosen standard output profile + * (Prophoto if non standard output profile given) + * + * If "ga" is NULL, then we're considering standard gamma with the chosen output profile. + * + * Generate an Image16 + * + * If a custom gamma profile can be created, divide by 327.68, convert to xyz and apply the custom gamma transform + * otherwise divide by 327.68, convert to xyz and apply the sRGB transform, before converting with gamma2curve + */ +Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, GammaValues *ga) { if (cx < 0) { @@ -241,49 +281,33 @@ Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int } Image16* image = new Image16 (cw, ch); - cmsHPROFILE oprof = iccStore->getProfile (profile); + + cmsHPROFILE oprof = nullptr; + if (ga) { + lcmsMutex->lock (); + iccStore->getGammaArray(icm, *ga); + oprof = iccStore->createGammaProfile(icm, *ga); + lcmsMutex->unlock (); + } else { + oprof = iccStore->getProfile (icm.output); + } if (oprof) { -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - - for (int i = cy; i < cy + ch; i++) { - float* rL = lab->L[i]; - float* ra = lab->a[i]; - float* rb = lab->b[i]; - short* xa = (short*)image->r(i - cy); - short* ya = (short*)image->g(i - cy); - short* za = (short*)image->b(i - cy); - - for (int j = cx; j < cx + cw; j++) { - float x_, y_, z_; - Color::Lab2XYZ(rL[j], ra[j], rb[j], x_, y_, z_); - - xa[j - cx] = float2uint16range(x_); - ya[j - cx] = float2uint16range(y_); - za[j - cx] = float2uint16range(z_); - - if(bw && y_ < 65535.f ) { //force Bw value and take highlight into account - xa[j - cx] = float2uint16range(y_ * Color::D50x); - za[j - cx] = float2uint16range(y_ * Color::D50z); - } - } + cmsUInt32Number flags = cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE; + if (icm.outputBPC) { + flags |= cmsFLAGS_BLACKPOINTCOMPENSATION; } - - cmsHPROFILE iprof = iccStore->getXYZProfile (); lcmsMutex->lock (); - cmsHTRANSFORM hTransform = cmsCreateTransform (iprof, TYPE_RGB_16, oprof, TYPE_RGB_16, intent, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE); + cmsHPROFILE iprof = cmsCreateLab4Profile(nullptr); + cmsHTRANSFORM hTransform = cmsCreateTransform (iprof, TYPE_Lab_FLT, oprof, TYPE_RGB_16, icm.outputIntent, flags); lcmsMutex->unlock (); - image->ExecCMSTransform(hTransform); - + image->ExecCMSTransform(hTransform, *lab, cx, cy); cmsDeleteTransform(hTransform); } else { #ifdef _OPENMP - #pragma omp parallel for if (multiThread) + #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif - for (int i = cy; i < cy + ch; i++) { float R, G, B; float* rL = lab->L[i]; @@ -297,278 +321,10 @@ Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int float fz = fy - (0.005f * rb[j]) / 327.68f; float LL = rL[j] / 327.68f; - float x_ = 65535.0f * (float) Color::f2xyz(fx) * Color::D50x; + float x_ = 65535.0f * Color::f2xyz(fx) * Color::D50x; //float y_ = 65535.0 * Color::f2xyz(fy); - float z_ = 65535.0f * (float) Color::f2xyz(fz) * Color::D50z; - float y_ = (LL > Color::epskap) ? (float) 65535.0f * fy * fy * fy : 65535.0f * LL / Color::kappa; - - Color::xyz2srgb(x_, y_, z_, R, G, B); - - image->r(i - cy, j - cx) = (int)Color::gamma2curve[CLIP(R)]; - image->g(i - cy, j - cx) = (int)Color::gamma2curve[CLIP(G)]; - image->b(i - cy, j - cx) = (int)Color::gamma2curve[CLIP(B)]; - } - } - } - - return image; -} - - -// for gamma options (BT709...sRGB linear...) -Image16* ImProcFunctions::lab2rgb16b (LabImage* lab, int cx, int cy, int cw, int ch, Glib::ustring profile, RenderingIntent intent, Glib::ustring profi, Glib::ustring gam, bool freegamma, double gampos, double slpos, double &ga0, double &ga1, double &ga2, double &ga3, double &ga4, double &ga5, double &ga6, bool bw) -{ - - if (cx < 0) { - cx = 0; - } - - if (cy < 0) { - cy = 0; - } - - if (cx + cw > lab->W) { - cw = lab->W - cx; - } - - if (cy + ch > lab->H) { - ch = lab->H - cy; - } - - Image16* image = new Image16 (cw, ch); - float p1, p2, p3, p4, p5, p6; //primaries - - double g_a0, g_a1, g_a2, g_a3, g_a4, g_a5; //gamma parameters - double pwr; - double ts; - ga6 = 0.0; - pwr = 1.0 / gampos; - ts = slpos; - int mode = 0, imax = 0; - - int t50; - int select_temp = 1; //5003K - const double eps = 0.000000001; // not divide by zero - - //primaries for 7 working profiles ==> output profiles - // eventually to adapt primaries if RT used special profiles ! - if (profi == "WideGamut") { - p1 = 0.7350; //Widegamut primaries - p2 = 0.2650; - p3 = 0.1150; - p4 = 0.8260; - p5 = 0.1570; - p6 = 0.0180; - select_temp = 1; - } else if (profi == "Adobe RGB") { - p1 = 0.6400; //Adobe primaries - p2 = 0.3300; - p3 = 0.2100; - p4 = 0.7100; - p5 = 0.1500; - p6 = 0.0600; - select_temp = 2; - } else if (profi == "sRGB") { - p1 = 0.6400; // sRGB primaries - p2 = 0.3300; - p3 = 0.3000; - p4 = 0.6000; - p5 = 0.1500; - p6 = 0.0600; - select_temp = 2; - } else if (profi == "BruceRGB") { - p1 = 0.6400; // Bruce primaries - p2 = 0.3300; - p3 = 0.2800; - p4 = 0.6500; - p5 = 0.1500; - p6 = 0.0600; - select_temp = 2; - } else if (profi == "Beta RGB") { - p1 = 0.6888; // Beta primaries - p2 = 0.3112; - p3 = 0.1986; - p4 = 0.7551; - p5 = 0.1265; - p6 = 0.0352; - select_temp = 1; - } else if (profi == "BestRGB") { - p1 = 0.7347; // Best primaries - p2 = 0.2653; - p3 = 0.2150; - p4 = 0.7750; - p5 = 0.1300; - p6 = 0.0350; - select_temp = 1; - } else if (profi == "Rec2020") { - p1 = 0.7080; // Rec2020 primaries - p2 = 0.2920; - p3 = 0.1700; - p4 = 0.7970; - p5 = 0.1310; - p6 = 0.0460; - select_temp = 2; - } else { - p1 = 0.7347; //ProPhoto and default primaries - p2 = 0.2653; - p3 = 0.1596; - p4 = 0.8404; - p5 = 0.0366; - p6 = 0.0001; - select_temp = 1; - } - - if (!freegamma) {//if Free gamma not selected - // gamma : ga0,ga1,ga2,ga3,ga4,ga5 by calcul - if(gam == "BT709_g2.2_s4.5") { - ga0 = 2.22; //BT709 2.2 4.5 - my prefered as D.Coffin - ga1 = 0.909995; - ga2 = 0.090005; - ga3 = 0.222222; - ga4 = 0.081071; - ga5 = 0.0; - } else if (gam == "sRGB_g2.4_s12.92") { - ga0 = 2.40; //sRGB 2.4 12.92 - RT default as Lightroom - ga1 = 0.947858; - ga2 = 0.052142; - ga3 = 0.077399; - ga4 = 0.039293; - ga5 = 0.0; - } else if (gam == "High_g1.3_s3.35") { - ga0 = 1.3 ; //for high dynamic images - ga1 = 0.998279; - ga2 = 0.001721; - ga3 = 0.298507; - ga4 = 0.005746; - ga5 = 0.0; - } else if (gam == "Low_g2.6_s6.9") { - ga0 = 2.6 ; //gamma 2.6 variable : for low contrast images - ga1 = 0.891161; - ga2 = 0.108839; - ga3 = 0.144928; - ga4 = 0.076332; - ga5 = 0.0; - } else if (gam == "linear_g1.0") { - ga0 = 1.0; //gamma=1 linear : for high dynamic images (cf : D.Coffin...) - ga1 = 1.; - ga2 = 0.; - ga3 = 1. / eps; - ga4 = 0.; - ga5 = 0.0; - } else if (gam == "standard_g2.2") { - ga0 = 2.2; //gamma=2.2 (as gamma of Adobe, Widegamut...) - ga1 = 1.; - ga2 = 0.; - ga3 = 1. / eps; - ga4 = 0.; - ga5 = 0.0; - } else if (gam == "standard_g1.8") { - ga0 = 1.8; //gamma=1.8 (as gamma of Prophoto) - ga1 = 1.; - ga2 = 0.; - ga3 = 1. / eps; - ga4 = 0.; - ga5 = 0.0; - } - } else { //free gamma selected - if(slpos == 0) { - slpos = eps; - } - - Color::calcGamma(pwr, ts, mode, imax, g_a0, g_a1, g_a2, g_a3, g_a4, g_a5); // call to calcGamma with selected gamma and slope : return parameters for LCMS2 - ga4 = g_a3 * ts; - ga0 = gampos; - ga1 = 1. / (1.0 + g_a4); - ga2 = g_a4 / (1.0 + g_a4); - ga3 = 1. / slpos; - ga5 = 0.0; - - } - - if(select_temp == 1) { - t50 = 5003; // for Widegamut, Prophoto Best, Beta D50 - } else if (select_temp == 2) { - t50 = 6504; // for sRGB, AdobeRGB, Bruce Rec2020 D65 - } - - cmsCIExyY xyD; - cmsCIExyYTRIPLE Primaries = {{p1, p2, 1.0},//red primaries - {p3, p4, 1.0}, // green - {p5, p6, 1.0} //blue - }; - cmsToneCurve* GammaTRC[3]; - cmsFloat64Number Parameters[7]; - Parameters[0] = ga0; - Parameters[1] = ga1; - Parameters[2] = ga2; - Parameters[3] = ga3; - Parameters[4] = ga4; - Parameters[5] = ga5; - Parameters[6] = ga6; -// 7 parameters for smoother curves - cmsWhitePointFromTemp(&xyD, t50); - GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(NULL, 5, Parameters);//5 = more smoother than 4 - cmsHPROFILE oprofdef = cmsCreateRGBProfileTHR(NULL, &xyD, &Primaries, GammaTRC); //oprofdef becomes Outputprofile - - cmsFreeToneCurve(GammaTRC[0]); - - if (oprofdef) { -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - - for (int i = cy; i < cy + ch; i++) { - float* rL = lab->L[i]; - float* ra = lab->a[i]; - float* rb = lab->b[i]; - short* xa = (short*)image->r(i - cy); - short* ya = (short*)image->g(i - cy); - short* za = (short*)image->b(i - cy); - - for (int j = cx; j < cx + cw; j++) { - float x_, y_, z_; - Color::Lab2XYZ(rL[j], ra[j], rb[j], x_, y_, z_); - - xa[j - cx] = float2uint16range(x_); - ya[j - cx] = float2uint16range(y_); - za[j - cx] = float2uint16range(z_); - - if(bw && y_ < 65535.f) { //force Bw value and take highlight into account - xa[j - cx] = float2uint16range(y_ * Color::D50x); - za[j - cx] = float2uint16range(y_ * Color::D50z); - } - } - } - - cmsHPROFILE iprof = iccStore->getXYZProfile (); - lcmsMutex->lock (); - cmsHTRANSFORM hTransform = cmsCreateTransform (iprof, TYPE_RGB_16, oprofdef, TYPE_RGB_16, intent, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE); - lcmsMutex->unlock (); - - image->ExecCMSTransform(hTransform); - cmsDeleteTransform(hTransform); - } else { -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - - for (int i = cy; i < cy + ch; i++) { - float R, G, B; - float* rL = lab->L[i]; - float* ra = lab->a[i]; - float* rb = lab->b[i]; - - for (int j = cx; j < cx + cw; j++) { - - float fy = (0.0086206897f * rL[j]) / 327.68f + 0.1379310345f; // (L+16)/116 - float fx = (0.002f * ra[j]) / 327.68f + fy; - float fz = fy - (0.005f * rb[j]) / 327.68f; - float LL = rL[j] / 327.68f; - - float x_ = 65535.0f * (float) Color::f2xyz(fx) * Color::D50x; - //float y_ = 65535.0 * Color::f2xyz(fy); - float z_ = 65535.0f * (float) Color::f2xyz(fz) * Color::D50z; - float y_ = (LL > Color::epskap) ? (float) 65535.0 * fy * fy * fy : 65535.0f * LL / Color::kappa; + float z_ = 65535.0f * Color::f2xyz(fz) * Color::D50z; + float y_ = (LL > (float)Color::epskap) ? 65535.0f * fy * fy * fy : 65535.0f * LL / (float)Color::kappa; Color::xyz2srgb(x_, y_, z_, R, G, B); diff --git a/rtengine/ipretinex.cc b/rtengine/ipretinex.cc index 06f779875..2dbdbafb1 100644 --- a/rtengine/ipretinex.cc +++ b/rtengine/ipretinex.cc @@ -140,8 +140,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e { if (deh.enabled) {//enabled - float mean, stddv, maxtr, mintr; - float delta; + float maxtr, mintr; constexpr float eps = 2.f; bool useHsl = deh.retinexcolorspace == "HSLLOG"; bool useHslLin = deh.retinexcolorspace == "HSLLIN"; @@ -551,8 +550,8 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e delete [] buffer; delete [] srcBuffer; - mean = 0.f; - stddv = 0.f; + float mean = 0.f; + float stddv = 0.f; // I call mean_stddv2 instead of mean_stddv ==> logBetaGain mean_stddv2( luminance, mean, stddv, W_L, H_L, maxtr, mintr); @@ -658,7 +657,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e maxi = maxtr - epsil; } - delta = maxi - mini; + float delta = maxi - mini; //printf("maxi=%f mini=%f mean=%f std=%f delta=%f maxtr=%f mintr=%f\n", maxi, mini, mean, stddv, delta, maxtr, mintr); if ( !delta ) { @@ -691,7 +690,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e // I call mean_stddv2 instead of mean_stddv ==> logBetaGain mean_stddv2( luminance, mean, stddv, W_L, H_L, maxtr, mintr); - float asig, bsig, amax, bmax, amin, bmin; + float asig = 0.f, bsig = 0.f, amax = 0.f, bmax = 0.f, amin = 0.f, bmin = 0.f; if (dehagaintransmissionCurve && mean != 0.f && stddv != 0.f) { //if curve asig = 0.166666f / stddv; diff --git a/rtengine/ipsharpen.cc b/rtengine/ipsharpen.cc index 279b77762..c1a2f479e 100644 --- a/rtengine/ipsharpen.cc +++ b/rtengine/ipsharpen.cc @@ -184,7 +184,7 @@ void ImProcFunctions::sharpening (LabImage* lab, float** b2, SharpeningParams &s #endif { - if (sharpenParam.edgesonly == false) { + if (!sharpenParam.edgesonly) { gaussianBlur (lab->L, b2, W, H, sharpenParam.radius / scale); } else { bilateral (lab->L, (float**)b3, b2, W, H, sharpenParam.edges_radius / scale, sharpenParam.edges_tolerance, multiThread); @@ -327,7 +327,7 @@ void ImProcFunctions::MLsharpen (LabImage* lab) { // JD: this algorithm maximize clarity of images; it does not play on accutance. It can remove (partialy) the effects of the AA filter) // I think we can use this algorithm alone in most cases, or first to clarify image and if you want a very little USM (unsharp mask sharpening) after... - if (params->sharpenEdge.enabled == false) { + if (!params->sharpenEdge.enabled) { return; } @@ -564,7 +564,7 @@ void ImProcFunctions::MLsharpen (LabImage* lab) //! \param luminance : Luminance channel of image void ImProcFunctions::MLmicrocontrast(float** luminance, int W, int H) { - if (params->sharpenMicro.enabled == false) { + if (!params->sharpenMicro.enabled) { return; } @@ -949,7 +949,7 @@ void ImProcFunctions::sharpeningcam (CieImage* ncie, float** b2) #endif { - if (params->sharpening.edgesonly == false) { + if (!params->sharpening.edgesonly) { gaussianBlur (ncie->sh_p, b2, W, H, params->sharpening.radius / scale); } else { bilateral (ncie->sh_p, (float**)b3, b2, W, H, params->sharpening.edges_radius / scale, params->sharpening.edges_tolerance, multiThread); diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index 547ebf69c..1c0a09929 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -24,8 +24,67 @@ #include "mytime.h" #include "rt_math.h" #include "sleef.c" + using namespace std; +namespace +{ + +float pow3(float x) +{ + return x * x * x; +} + +float pow4(float x) +{ + return (x * x) * (x * x); +} + +float pown(float x, int n) +{ + + switch (n) { + case 0: + return 1; + + case 2: + return x * x; + + case 4: + return pow4(x); + + case 6: + return (x * x) * pow4(x); + + case 8: + return pow4(x) * pow4(x); + + default: + return pow_F(x, n); + } +} + +float normn(float a, float b, int n) +{ + switch (n) { + case 2: + return sqrtf(a * a + b * b); + + case 4: + return sqrtf(sqrtf(pow4(a) + pow4(b))); + + case 6: + return sqrtf(xcbrtf(pow3(a) * pow3(a) + pow3(b) * pow3(b))); + + case 8: + return sqrtf(sqrtf(sqrtf(pow4(a) * pow4(a) + pow4(b) * pow4(b)))); + + default: + return pow_F(pown(a, n) + pown(b, n), 1.f / n); + } +} +} + namespace rtengine { #undef CLIPTOC @@ -43,7 +102,7 @@ bool ImProcFunctions::transCoord (int W, int H, const std::vector &src, green.clear (); blue.clear (); - if (!needsCA() && !needsDistortion() && !needsRotation() && !needsPerspective() && (!params->lensProf.useDist || pLCPMap == NULL)) { + if (!needsCA() && !needsDistortion() && !needsRotation() && !needsPerspective() && (!params->lensProf.useDist || pLCPMap == nullptr)) { for (size_t i = 0; i < src.size(); i++) { red.push_back (Coord2D (src[i].x, src[i].y)); green.push_back (Coord2D (src[i].x, src[i].y)); @@ -234,7 +293,7 @@ void ImProcFunctions::transform (Imagefloat* original, Imagefloat* transformed, double focalLen, double focalLen35mm, float focusDist, int rawRotationDeg, bool fullImage) { - LCPMapper *pLCPMap = NULL; + LCPMapper *pLCPMap = nullptr; if (needsLCP()) { // don't check focal length to allow distortion correction for lenses without chip LCPProfile *pLCPProf = lcpStore->getProfile(params->lensProf.lcpFile); @@ -382,13 +441,15 @@ static float calcGradientFactor(const struct grad_params& gp, int x, int y) float val = ((float)(gy - gp.top_edge_0) * gp.ys_inv); if (gp.bright_top) { - val = 1.0 - val; + val = 1.f - val; } - if (gp.scale < 1.0) { - val = pow(xsinf(val * M_PI / 2), 3); + val *= M_PIf_2; + + if (gp.scale < 1.f) { + val = pow3(xsinf(val)); } else { - val = 1.0 - pow(xcosf(val * M_PI / 2), 3); + val = 1.f - pow3(xcosf(val)); } return gp.scale + val * (1.0 - gp.scale); @@ -396,7 +457,7 @@ static float calcGradientFactor(const struct grad_params& gp, int x, int y) } else { int gy = gp.transpose ? x : y; int gx = gp.transpose ? gp.h - y - 1 : x; - float top_edge = gp.yc - gp.ys / 2.0 - gp.ta * (gx - gp.xc); + float top_edge = gp.top_edge_0 - gp.ta * (gx - gp.xc); if (gy < top_edge) { return gp.topmul; @@ -405,14 +466,14 @@ static float calcGradientFactor(const struct grad_params& gp, int x, int y) } else { float val = ((float)(gy - top_edge) * gp.ys_inv); - if (gp.bright_top) { - val = 1.0 - val; - } + val = gp.bright_top ? 1.f - val : val; - if (gp.scale < 1.0) { - val = pow(xsinf(val * M_PI / 2), 3); + val *= M_PIf_2; + + if (gp.scale < 1.f) { + val = pow3(xsinf(val)); } else { - val = 1.0 - pow(xcosf(val * M_PI / 2), 3); + val = 1.f - pow3(xcosf(val)); } return gp.scale + val * (1.0 - gp.scale); @@ -459,7 +520,7 @@ static void calcPCVignetteParams(int fW, int fH, int oW, int oH, const PCVignett pcv.sepmix = 0; pcv.oe_a = sqrt(2.0) * long_side * 0.5; pcv.oe_b = pcv.oe_a * short_side / long_side; - pcv.ie_mul = 1.0 / sqrt(2.0); + pcv.ie_mul = (1.0 / sqrt(2.0)) * (1.0 - pcv.feather); pcv.is_super_ellipse_mode = false; pcv.is_portrait = (pcv.w < pcv.h); @@ -471,10 +532,10 @@ static void calcPCVignetteParams(int fW, int fH, int oW, int oH, const PCVignett pcv.sepmix = (sepf - pcv.sep) * 0.5; // 0.0 to 1.0 pcv.oe1_a = powf(2.0, 1.0 / pcv.sep) * long_side * 0.5; pcv.oe1_b = pcv.oe1_a * short_side / long_side; - pcv.ie1_mul = 1.0 / powf(2.0, 1.0 / pcv.sep); + pcv.ie1_mul = (1.0 / powf(2.0, 1.0 / pcv.sep)) * (1.0 - pcv.feather); pcv.oe2_a = powf(2.0, 1.0 / (pcv.sep + 2)) * long_side * 0.5; pcv.oe2_b = pcv.oe2_a * short_side / long_side; - pcv.ie2_mul = 1.0 / powf(2.0, 1.0 / (pcv.sep + 2)); + pcv.ie2_mul = (1.0 / powf(2.0, 1.0 / (pcv.sep + 2))) * (1.0 - pcv.feather); } if (roundness > 0.5) { @@ -496,7 +557,7 @@ static void calcPCVignetteParams(int fW, int fH, int oW, int oH, const PCVignett static float calcPCVignetteFactor(const struct pcv_params& pcv, int x, int y) { - float fo = 1.0; + float fo = 1.f; if (x < pcv.x1 || x > pcv.x2 || y < pcv.y1 || y > pcv.y2) { /* @@ -517,23 +578,19 @@ static float calcPCVignetteFactor(const struct pcv_params& pcv, int x, int y) fo = sqrtf(dist_x * dist_x + dist_y * dist_y) * pcv.fadeout_mul; - if (fo >= 1.0) { - return 1.0; + if (fo >= 1.f) { + return 1.f; } } - float val, a, b; + float a = fabs((x - pcv.x1) - pcv.w * 0.5f); + float b = fabs((y - pcv.y1) - pcv.h * 0.5f); - if (pcv.is_portrait) { - a = fabs((y - pcv.y1) - pcv.h * 0.5); - b = fabs((x - pcv.x1) - pcv.w * 0.5); - } else { - a = fabs((x - pcv.x1) - pcv.w * 0.5); - b = fabs((y - pcv.y1) - pcv.h * 0.5); + if(pcv.is_portrait) { + std::swap(a, b); } - float angle = xatan2f(b, a); - float dist = sqrtf(a * a + b * b); + float dist = normn(a, b, 2); float dist_oe, dist_ie; float2 sincosval; @@ -546,37 +603,39 @@ static float calcPCVignetteFactor(const struct pcv_params& pcv, int x, int y) } if (pcv.is_super_ellipse_mode) { - float dist_oe1 = pcv.oe1_a * pcv.oe1_b / pow_F(pow(pcv.oe1_b * sincosval.y, pcv.sep) + pow(pcv.oe1_a * sincosval.x, pcv.sep), 1.0 / pcv.sep); - float dist_oe2 = pcv.oe2_a * pcv.oe2_b / pow_F(pow(pcv.oe2_b * sincosval.y, pcv.sep + 2) + pow(pcv.oe2_a * sincosval.x, pcv.sep + 2), 1.0 / (pcv.sep + 2)); - float dist_ie1 = pcv.ie1_mul * dist_oe1 * (1.0 - pcv.feather); - float dist_ie2 = pcv.ie2_mul * dist_oe2 * (1.0 - pcv.feather); - dist_oe = dist_oe1 * (1.0 - pcv.sepmix) + dist_oe2 * pcv.sepmix; - dist_ie = dist_ie1 * (1.0 - pcv.sepmix) + dist_ie2 * pcv.sepmix; + float dist_oe1 = pcv.oe1_a * pcv.oe1_b / normn(pcv.oe1_b * sincosval.y, pcv.oe1_a * sincosval.x, pcv.sep); + float dist_oe2 = pcv.oe2_a * pcv.oe2_b / normn(pcv.oe2_b * sincosval.y, pcv.oe2_a * sincosval.x, pcv.sep + 2); + float dist_ie1 = pcv.ie1_mul * dist_oe1; + float dist_ie2 = pcv.ie2_mul * dist_oe2; + dist_oe = dist_oe1 * (1.f - pcv.sepmix) + dist_oe2 * pcv.sepmix; + dist_ie = dist_ie1 * (1.f - pcv.sepmix) + dist_ie2 * pcv.sepmix; } else { dist_oe = pcv.oe_a * pcv.oe_b / sqrtf(SQR(pcv.oe_b * sincosval.y) + SQR(pcv.oe_a * sincosval.x)); - dist_ie = pcv.ie_mul * dist_oe * (1.0 - pcv.feather); + dist_ie = pcv.ie_mul * dist_oe; } if (dist <= dist_ie) { - return 1.0; + return 1.f; } + float val; + if (dist >= dist_oe) { val = pcv.scale; } else { - val = (dist - dist_ie) / (dist_oe - dist_ie); + val = M_PIf_2 * (dist - dist_ie) / (dist_oe - dist_ie); - if (pcv.scale < 1.0) { - val = pow(xcosf(val * M_PI / 2), 4); + if (pcv.scale < 1.f) { + val = pow4(xcosf(val)); } else { - val = 1 - pow(xsinf(val * M_PI / 2), 4); + val = 1 - pow4(xsinf(val)); } - val = pcv.scale + val * (1.0 - pcv.scale); + val = pcv.scale + val * (1.f - pcv.scale); } - if (fo < 1.0) { - val = 1.0 * fo + val * (1.0 - fo); + if (fo < 1.f) { + val = fo + val * (1.f - fo); } return val; @@ -584,6 +643,7 @@ static float calcPCVignetteFactor(const struct pcv_params& pcv, int x, int y) void ImProcFunctions::transformLuminanceOnly (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int oW, int oH, int fW, int fH) { + const bool applyVignetting = needsVignetting(); const bool applyGradient = needsGradient(); const bool applyPCVignetting = needsPCVignetting(); @@ -703,7 +763,7 @@ void ImProcFunctions::transformHighQuality (Imagefloat* original, Imagefloat* tr oH * tan(hpalpha) * sqrt(SQR(4 * maxRadius) + SQR(oH * tan(hpalpha)))) / (SQR(maxRadius) * 8))); double hpcospt = (hpdeg >= 0 ? 1.0 : -1.0) * cos (hpteta), hptanpt = tan (hpteta); - double ascale = params->commonTrans.autofill ? getTransformAutoFill (oW, oH, fullImage ? pLCPMap : NULL) : 1.0; + double ascale = params->commonTrans.autofill ? getTransformAutoFill (oW, oH, fullImage ? pLCPMap : nullptr) : 1.0; // smaller crop images are a problem, so only when processing fully bool enableLCPCA = pLCPMap && params->lensProf.useCA && fullImage && pLCPMap->enableCA; @@ -794,12 +854,13 @@ void ImProcFunctions::transformHighQuality (Imagefloat* original, Imagefloat* tr // multiplier for vignetting correction double vignmul = 1.0; - if (needsVignetting()) + if (needsVignetting()) { if(darkening) { vignmul /= std::max(v + mul * tanh (b * (maxRadius - s * r2) / maxRadius), 0.001); } else { vignmul *= (v + mul * tanh (b * (maxRadius - s * r2) / maxRadius)); } + } if (needsGradient()) { vignmul *= calcGradientFactor(gp, cx + x, cy + y); @@ -963,12 +1024,13 @@ void ImProcFunctions::transformPreview (Imagefloat* original, Imagefloat* transf // multiplier for vignetting correction double vignmul = 1.0; - if (needsVignetting()) + if (needsVignetting()) { if(darkening) { vignmul /= std::max(v + mul * tanh (b * (maxRadius - s * r2) / maxRadius), 0.001); } else { vignmul = v + mul * tanh (b * (maxRadius - s * r2) / maxRadius); } + } if (needsGradient()) { vignmul *= calcGradientFactor(gp, cx + x, cy + y); @@ -1005,7 +1067,7 @@ void ImProcFunctions::transformPreview (Imagefloat* original, Imagefloat* transf double ImProcFunctions::getTransformAutoFill (int oW, int oH, const LCPMapper *pLCPMap) { - if (!needsCA() && !needsDistortion() && !needsRotation() && !needsPerspective() && (!params->lensProf.useDist || pLCPMap == NULL)) { + if (!needsCA() && !needsDistortion() && !needsRotation() && !needsPerspective() && (!params->lensProf.useDist || pLCPMap == nullptr)) { return 1; } diff --git a/rtengine/ipvibrance.cc b/rtengine/ipvibrance.cc index 1d152c737..60994175b 100644 --- a/rtengine/ipvibrance.cc +++ b/rtengine/ipvibrance.cc @@ -77,7 +77,7 @@ void ImProcFunctions::vibrance (LabImage* lab) // int skip=1; //scale==1 ? 1 : 16; bool skinCurveIsSet = false; - DiagonalCurve* dcurve = NULL; + DiagonalCurve* dcurve = nullptr; dcurve = new DiagonalCurve (params->vibrance.skintonescurve, CURVES_MIN_POLY_POINTS); if (dcurve) { @@ -85,14 +85,14 @@ void ImProcFunctions::vibrance (LabImage* lab) skinCurveIsSet = true; } else { delete dcurve; - dcurve = NULL; + dcurve = nullptr; } } if (!skinCurveIsSet && !params->vibrance.pastels && !params->vibrance.saturated) { if (dcurve) { delete dcurve; - dcurve = NULL; + dcurve = nullptr; } return; @@ -117,7 +117,7 @@ void ImProcFunctions::vibrance (LabImage* lab) if (dcurve) { delete dcurve; - dcurve = NULL; + dcurve = nullptr; } @@ -180,7 +180,7 @@ void ImProcFunctions::vibrance (LabImage* lab) #ifdef _DEBUG - MunsellDebugInfo* MunsDebugInfo = NULL; + MunsellDebugInfo* MunsDebugInfo = nullptr; if (avoidcolorshift) { MunsDebugInfo = new MunsellDebugInfo(); @@ -744,7 +744,7 @@ void ImProcFunctions::vibrance (LabImage* lab) printf(" Gamut: G1negat=%iiter G165535=%iiter G2negsat=%iiter G265535=%iiter\n", negat, moreRGB, negsat, moresat); if (MunsDebugInfo) { - printf(" Munsell chrominance: MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad depass=%i\n", MunsDebugInfo->maxdhue[0], MunsDebugInfo->maxdhue[1], MunsDebugInfo->maxdhue[2], MunsDebugInfo->maxdhue[3], MunsDebugInfo->depass); + printf(" Munsell chrominance: MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad depass=%u\n", MunsDebugInfo->maxdhue[0], MunsDebugInfo->maxdhue[1], MunsDebugInfo->maxdhue[2], MunsDebugInfo->maxdhue[3], MunsDebugInfo->depass); } } diff --git a/rtengine/ipwavelet.cc b/rtengine/ipwavelet.cc index d5aa54890..ee8f10ad1 100644 --- a/rtengine/ipwavelet.cc +++ b/rtengine/ipwavelet.cc @@ -39,6 +39,7 @@ #include "opthelper.h" #include "median.h" #include "EdgePreservingDecomposition.h" +#include "iccstore.h" #ifdef _OPENMP #include @@ -102,7 +103,6 @@ struct cont_params { int backm; float eddet; float eddetthr; - bool lips; float eddetthrHi; bool link; bool lip3; @@ -217,19 +217,12 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int cp.tmstrength = params->wavelet.tmrs; //cp.tonemap = params->wavelet.tmr; - cp.contena = true; cp.contena = params->wavelet.expcontrast; - cp.chromena = true; cp.chromena = params->wavelet.expchroma; - cp.edgeena = true; cp.edgeena = params->wavelet.expedge; - cp.resena = true; cp.resena = params->wavelet.expresid; - cp.finena = true; cp.finena = params->wavelet.expfinal; - cp.toningena = true; cp.toningena = params->wavelet.exptoning; - cp.noiseena = true; cp.noiseena = params->wavelet.expnoise; if(params->wavelet.Backmethod == "black") { @@ -490,7 +483,6 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int cp.lev3s = static_cast(params->wavelet.level3noise.value[0]); cp.lev3n = static_cast(params->wavelet.level3noise.value[1]); - cp.detectedge = false; cp.detectedge = params->wavelet.medianlev; //printf("low=%f mean=%f sd=%f max=%f\n",cp.edg_low,cp.edg_mean,cp.edg_sd,cp.edg_max); int minwin = min(imwidth, imheight); @@ -603,6 +595,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int //printf("levwav = %d\n",levwav); +#ifdef _OPENMP int numthreads = 1; int maxnumberofthreadsforwavelet = 0; @@ -640,7 +633,6 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int //printf("maxthre=%d\n",maxnumberofthreadsforwavelet); -#ifdef _OPENMP // Calculate number of tiles. If less than omp_get_max_threads(), then limit num_threads to number of tiles if( options.rgbDenoiseThreadLimit > 0) { @@ -674,10 +666,6 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int printf("Ip Wavelet uses %d main thread(s) and up to %d nested thread(s) for each main thread\n", numthreads, wavNestedLevels); } - -#endif - -#ifdef _OPENMP #pragma omp parallel num_threads(numthreads) #endif { @@ -712,7 +700,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int int height = tilebottom - tiletop; LabImage * labco; float **Lold; - float *LoldBuffer = NULL; + float *LoldBuffer = nullptr; if(numtiles == 1) { // untiled processing => we can use output buffer for labco labco = dst; @@ -838,7 +826,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int for(int i = (tileheight + 1) / 2; i < tileheight; i++) { delete [] varhue[i]; - varhue[i] = NULL; + varhue[i] = nullptr; } } else { // reduce the varhue array to get faster access in following processing for (int i = 0; i < (tileheight + 1) / 2; i++) { @@ -858,7 +846,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int } // printf("LevwavL before: %d\n",levwavL); - if(cp.contrast == 0.f && cp.tonemap == false && cp.conres == 0.f && cp.conresH == 0.f && cp.val == 0 && !ref0 && params->wavelet.CLmethod == "all") { // no processing of residual L or edge=> we probably can reduce the number of levels + if(cp.contrast == 0.f && !cp.tonemap && cp.conres == 0.f && cp.conresH == 0.f && cp.val == 0 && !ref0 && params->wavelet.CLmethod == "all") { // no processing of residual L or edge=> we probably can reduce the number of levels while(levwavL > 0 && cp.mul[levwavL - 1] == 0.f) { // cp.mul[level] == 0.f means no changes to level levwavL--; } @@ -880,7 +868,6 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int if(!Ldecomp->memoryAllocationFailed) { float madL[8][3]; - bool memoryAllocationFailed = false; #ifdef _RT_NESTED_OPENMP #pragma omp parallel for schedule(dynamic) collapse(2) num_threads(wavNestedLevels) if(wavNestedLevels>1) #endif @@ -922,30 +909,28 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int vari[1] = 8.f * SQR((cp.lev1n / 125.0) * (1.0 + cp.lev1n / 25.0)); vari[2] = 8.f * SQR((cp.lev2n / 125.0) * (1.0 + cp.lev2n / 25.0)); vari[3] = 8.f * SQR((cp.lev3n / 125.0) * (1.0 + cp.lev3n / 25.0)); - int edge = 1; if((cp.lev0n > 0.1f || cp.lev1n > 0.1f || cp.lev2n > 0.1f || cp.lev3n > 0.1f) && cp.noiseena) { + int edge = 1; vari[0] = max(0.0001f, vari[0]); vari[1] = max(0.0001f, vari[1]); vari[2] = max(0.0001f, vari[2]); vari[3] = max(0.0001f, vari[3]); - float* noisevarlum = NULL; // we need a dummy to pass it to WaveletDenoiseAllL + float* noisevarlum = nullptr; // we need a dummy to pass it to WaveletDenoiseAllL - if(!WaveletDenoiseAllL(*Ldecomp, noisevarlum, madL, vari, edge)) { // - memoryAllocationFailed = true; - } + WaveletDenoiseAllL(*Ldecomp, noisevarlum, madL, vari, edge); } ind = 1; //Flat curve for Contrast=f(H) in levels - FlatCurve* ChCurve = NULL;//curve C=f(H) + FlatCurve* ChCurve = nullptr;//curve C=f(H) bool Chutili = false; ChCurve = new FlatCurve(params->wavelet.Chcurve); if (!ChCurve || ChCurve->isIdentity()) { if (ChCurve) { delete ChCurve; - ChCurve = NULL; + ChCurve = nullptr; } } else { Chutili = true; @@ -968,14 +953,14 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int } //Flat curve for H=f(H) in residual image - FlatCurve* hhCurve = NULL;//curve H=f(H) + FlatCurve* hhCurve = nullptr;//curve H=f(H) bool hhutili = false; hhCurve = new FlatCurve(params->wavelet.hhcurve); if (!hhCurve || hhCurve->isIdentity()) { if (hhCurve) { delete hhCurve; - hhCurve = NULL; + hhCurve = nullptr; } } else { hhutili = true; @@ -987,7 +972,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int // printf("Levwava before: %d\n",levwava); if(cp.chrores == 0.f && params->wavelet.CLmethod == "all" && !cp.cbena) { // no processing of residual ab => we probably can reduce the number of levels - while(levwava > 0 && !cp.diag && (((cp.CHmet == 2 && (cp.chro == 0.f || cp.mul[levwava - 1] == 0.f )) || (cp.CHmet != 2 && (levwava == 10 || (!cp.curv || (cp.curv && cp.mulC[levwava - 1] == 0.f)))))) && (!cp.opaRG || levwava == 10 || (cp.opaRG && cp.mulopaRG[levwava - 1] == 0.f)) && ((levwava == 10 || (cp.CHSLmet == 1 && cp.mulC[levwava - 1] == 0.f)))) { + while(levwava > 0 && !cp.diag && (((cp.CHmet == 2 && (cp.chro == 0.f || cp.mul[levwava - 1] == 0.f )) || (cp.CHmet != 2 && (levwava == 10 || (!cp.curv || cp.mulC[levwava - 1] == 0.f))))) && (!cp.opaRG || levwava == 10 || (cp.opaRG && cp.mulopaRG[levwava - 1] == 0.f)) && ((levwava == 10 || (cp.CHSLmet == 1 && cp.mulC[levwava - 1] == 0.f)))) { levwava--; } } @@ -1008,7 +993,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int //printf("Levwavb before: %d\n",levwavb); if(cp.chrores == 0.f && params->wavelet.CLmethod == "all" && !cp.cbena) { // no processing of residual ab => we probably can reduce the number of levels - while(levwavb > 0 && !cp.diag && (((cp.CHmet == 2 && (cp.chro == 0.f || cp.mul[levwavb - 1] == 0.f )) || (cp.CHmet != 2 && (levwavb == 10 || (!cp.curv || (cp.curv && cp.mulC[levwavb - 1] == 0.f)))))) && (!cp.opaBY || levwavb == 10 || (cp.opaBY && cp.mulopaBY[levwavb - 1] == 0.f)) && ((levwavb == 10 || (cp.CHSLmet == 1 && cp.mulC[levwavb - 1] == 0.f)))) { + while(levwavb > 0 && !cp.diag && (((cp.CHmet == 2 && (cp.chro == 0.f || cp.mul[levwavb - 1] == 0.f )) || (cp.CHmet != 2 && (levwavb == 10 || (!cp.curv || cp.mulC[levwavb - 1] == 0.f))))) && (!cp.opaBY || levwavb == 10 || (cp.opaBY && cp.mulopaBY[levwavb - 1] == 0.f)) && ((levwavb == 10 || (cp.CHSLmet == 1 && cp.mulC[levwavb - 1] == 0.f)))) { levwavb--; } } @@ -1029,7 +1014,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int // printf("Levwavab before: %d\n",levwavab); if(cp.chrores == 0.f && !hhutili && params->wavelet.CLmethod == "all") { // no processing of residual ab => we probably can reduce the number of levels - while(levwavab > 0 && (((cp.CHmet == 2 && (cp.chro == 0.f || cp.mul[levwavab - 1] == 0.f )) || (cp.CHmet != 2 && (levwavab == 10 || (!cp.curv || (cp.curv && cp.mulC[levwavab - 1] == 0.f)))))) && (!cp.opaRG || levwavab == 10 || (cp.opaRG && cp.mulopaRG[levwavab - 1] == 0.f)) && ((levwavab == 10 || (cp.CHSLmet == 1 && cp.mulC[levwavab - 1] == 0.f)))) { + while(levwavab > 0 && (((cp.CHmet == 2 && (cp.chro == 0.f || cp.mul[levwavab - 1] == 0.f )) || (cp.CHmet != 2 && (levwavab == 10 || (!cp.curv || cp.mulC[levwavab - 1] == 0.f))))) && (!cp.opaRG || levwavab == 10 || (cp.opaRG && cp.mulopaRG[levwavab - 1] == 0.f)) && ((levwavab == 10 || (cp.CHSLmet == 1 && cp.mulC[levwavab - 1] == 0.f)))) { levwavab--; } } @@ -1240,7 +1225,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int } } - if(LoldBuffer != NULL) { + if(LoldBuffer != nullptr) { delete [] LoldBuffer; delete [] Lold; } @@ -1252,7 +1237,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int } for (int i = 0; i < tileheight; i++) - if(varhue[i] != NULL) { + if(varhue[i] != nullptr) { delete [] varhue[i]; } @@ -1405,14 +1390,11 @@ void ImProcFunctions::Evaluate2(wavelet_decomposition &WaveletCoeffs_L, void ImProcFunctions::Eval2 (float ** WavCoeffs_L, int level, const struct cont_params& cp, int W_L, int H_L, int skip_L, int ind, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, float *madL) { - const float eps = 0.01f; - float ava[4], avb[4], avLP[4], avLN[4]; - float maxL[4], minL[4], maxa[4], maxb[4]; + float avLP[4], avLN[4]; + float maxL[4], minL[4]; float sigP[4], sigN[4]; - float AvL, AvN, SL, SN, maxLP, maxLN, MADL; - float madLlev[10]; - float thr = params->wavelet.thres; + float AvL, AvN, SL, SN, maxLP, maxLN; for (int dir = 1; dir < 4; dir++) { Aver(WavCoeffs_L[dir], W_L * H_L, avLP[dir], avLN[dir], maxL[dir], minL[dir]); @@ -1425,7 +1407,6 @@ void ImProcFunctions::Eval2 (float ** WavCoeffs_L, int level, const struct cont SN = 0.f; maxLP = 0.f; maxLN = 0.f; - MADL = 0.f; for (int dir = 1; dir < 4; dir++) { AvL += avLP[dir]; @@ -1434,7 +1415,6 @@ void ImProcFunctions::Eval2 (float ** WavCoeffs_L, int level, const struct cont SN += sigN[dir]; maxLP += maxL[dir]; maxLN += minL[dir]; - MADL += madL[dir]; } AvL /= 3; @@ -1443,13 +1423,6 @@ void ImProcFunctions::Eval2 (float ** WavCoeffs_L, int level, const struct cont SN /= 3; maxLP /= 3; maxLN /= 3; - MADL /= 3; - - if(level < 4) { - MADL = sqrt(MADL); - } else { - MADL = 0.f; - } mean[level] = AvL; meanN[level] = AvN; @@ -1463,7 +1436,7 @@ float *ImProcFunctions::ContrastDR(float *Source, int skip, struct cont_params & { int n = W_L * H_L; - if(Contrast == NULL) { + if(Contrast == nullptr) { Contrast = new float[n]; } @@ -1517,7 +1490,7 @@ SSEFUNCTION float *ImProcFunctions::CompressDR(float *Source, int skip, struct c float *ucr = ContrastDR(Source, skip, cp, W_L, H_L, Compression, DetailBoost, max0, min0, ave, ah, bh, al, bl, factorx); - if(Compressed == NULL) { + if(Compressed == nullptr) { Compressed = ucr; } @@ -1647,7 +1620,7 @@ void ImProcFunctions::EPDToneMapResid(float * WavCoeffs_L0, unsigned int Iterat float sca = params->epd.scale; float gamm = params->wavelet.gamma; float rew = params->epd.reweightingIterates; - EdgePreservingDecomposition epd2 = EdgePreservingDecomposition(W_L, H_L); + EdgePreservingDecomposition epd2(W_L, H_L); cp.TMmeth = 2; //default after testing if(cp.TMmeth == 1) { @@ -1725,7 +1698,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * float max0 = 0.f; float min0 = FLT_MAX; - if(contrast != 0.f || cp.tonemap && cp.resena) { // contrast = 0.f means that all will be multiplied by 1.f, so we can skip this step + if(contrast != 0.f || (cp.tonemap && cp.resena)) { // contrast = 0.f means that all will be multiplied by 1.f, so we can skip this step #ifdef _RT_NESTED_OPENMP #pragma omp parallel for reduction(+:avedbl) num_threads(wavNestedLevels) if(wavNestedLevels>1) #endif @@ -1799,26 +1772,23 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * float *koeLi[12]; float maxkoeLi[12]; - float *koeLibuffer = NULL; - bool lipschitz = true; + float *koeLibuffer = nullptr; - if(lipschitz == true) { - for(int y = 0; y < 12; y++) { - maxkoeLi[y] = 0.f; //9 - } - - koeLibuffer = new float[12 * H_L * W_L]; //12 - - for (int i = 0; i < 12; i++) { //9 - koeLi[i] = &koeLibuffer[i * W_L * H_L]; - } - - for(int j = 0; j < 12; j++) //9 - for (int i = 0; i < W_L * H_L; i++) { - koeLi[j][i] = 0.f; - } + for(int y = 0; y < 12; y++) { + maxkoeLi[y] = 0.f; //9 } + koeLibuffer = new float[12 * H_L * W_L]; //12 + + for (int i = 0; i < 12; i++) { //9 + koeLi[i] = &koeLibuffer[i * W_L * H_L]; + } + + for(int j = 0; j < 12; j++) //9 + for (int i = 0; i < W_L * H_L; i++) { + koeLi[j][i] = 0.f; + } + #ifdef _RT_NESTED_OPENMP #pragma omp parallel num_threads(wavNestedLevels) if(wavNestedLevels>1) #endif @@ -1922,7 +1892,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * // float eddlow=5.f + cp.edgampl/2.f;//settings->ed_low;//5 to 40 - if(cp.detectedge && lipschitz == true) { //enabled Lipschitz control...more memory..more time... + if(cp.detectedge) { //enabled Lipschitz control...more memory..more time... float *tmCBuffer = new float[H_L * W_L]; float *tmC[H_L]; @@ -2065,7 +2035,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float * float ** WavCoeffs_L = WaveletCoeffs_L.level_coeffs(lvl); - ContAllL (koeLi, maxkoeLi, lipschitz, maxlvl, labco, varhue, varchrom, WavCoeffs_L, WavCoeffs_L0, lvl, dir, cp, Wlvl_L, Hlvl_L, skip, mean, meanN, sigma, sigmaN, MaxP, MaxN, wavCLVCcurve, waOpacityCurveW, ChCurve, Chutili); + ContAllL (koeLi, maxkoeLi, true, maxlvl, labco, varhue, varchrom, WavCoeffs_L, WavCoeffs_L0, lvl, dir, cp, Wlvl_L, Hlvl_L, skip, mean, meanN, sigma, sigmaN, MaxP, MaxN, wavCLVCcurve, waOpacityCurveW, ChCurve, Chutili); } @@ -2280,9 +2250,6 @@ void ImProcFunctions::WaveletcontAllAB(LabImage * labco, float ** varhue, float int Wlvl_ab = WaveletCoeffs_ab.level_W(lvl); int Hlvl_ab = WaveletCoeffs_ab.level_H(lvl); - - int skip_ab = WaveletCoeffs_ab.level_stride(lvl); - //printf("lev=%d skipL=%d skipab=%d\n",lvl, skip_L,skip_ab); float ** WavCoeffs_ab = WaveletCoeffs_ab.level_coeffs(lvl); ContAllAB (labco, maxlvl, varhue, varchrom, WavCoeffs_ab, WavCoeffs_ab0, lvl, dir, waOpacityCurveW, cp, Wlvl_ab, Hlvl_ab, useChannelA); } @@ -2621,7 +2588,6 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit scaleskip[sc] = scales[sc] / skip; } - float atten01234 = 0.80f; float t_r = settings->top_right; float t_l = settings->top_left; float b_r = settings->bot_right; @@ -2634,7 +2600,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit float * koe; float maxkoe = 0.f; - if(lipschitz == false) { + if(!lipschitz) { koe = new float [H_L * W_L]; for (int i = 0; i < W_L * H_L; i++) { @@ -2718,6 +2684,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit float value = ((float)cp.val) / 8.f; //strength if (scaleskip[1] < 1.f) { + float atten01234 = 0.80f; value *= (atten01234 * scaleskip[1]); //for zoom < 100% reduce strength...I choose level 1...but!! } @@ -2766,7 +2733,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit //take into account local contrast float refin = value * exp (expkoef); - if(cp.link == true && cp.noiseena) { //combi + if(cp.link && cp.noiseena) { //combi { if(level == 0) { refin *= (1.f + cp.lev0s / 50.f); // we can change this sensibility! @@ -2809,7 +2776,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit int k = i * W_L + j; if(cp.detectedge) { - if(lipschitz == false) { + if(!lipschitz) { if(cp.eddet > 10.f) { edge = (aedstr * cp.eddet + bedstr) * (edgePrecalc * (1.f + koe[k])) / (1.f + 0.9f * maxkoe); } else { @@ -2817,7 +2784,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit } } - if(lipschitz == true) { + if(lipschitz) { if(level < 4) { edge = 1.f + (edgePrecalc - 1.f) * (koeLi[level * 3][k]) / (1.f + 0.9f * maxkoeLi[level * 3 + dir - 1]); } else { @@ -2869,9 +2836,9 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit kinterm = 1.f; float kc = kmul * (wavCLVCcurve[absciss * 500.f] - 0.5f); float kcd = kmuld * (wavCLVCcurve[absciss * 500.f] - 0.5f); - float reduceeffect = 0.6f; if(kc >= 0.f) { + float reduceeffect = 0.6f; kinterm = 1.f + reduceeffect * kmul * (wavCLVCcurve[absciss * 500.f] - 0.5f); //about 1 to 3 general and big amplification for max (under 0) } else { kinterm = 1.f - (SQR(kcd)) / 10.f; @@ -2919,7 +2886,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit int k = i * W_L + j; if(cp.detectedge) { - if(lipschitz == false) { + if(!lipschitz) { if(cp.eddet > 10.f) { edge = (aedstr * cp.eddet + bedstr) * (edgePrecalc * (1.f + koe[k])) / (1.f + 0.9f * maxkoe); } else { @@ -2927,7 +2894,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit } } - if(lipschitz == true) { + if(lipschitz) { if(level < 4) { edge = 1.f + (edgePrecalc - 1.f) * (koeLi[level * 3][k]) / (1.f + 0.9f * maxkoeLi[level * 3 + dir - 1]); } else { @@ -3009,13 +2976,13 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit } } - if(lipschitz == false) { + if(!lipschitz) { delete [] koe; } } - if(cp.link == false && cp.noiseena) { //used both with denoise 1 2 3 + if(!cp.link && cp.noiseena) { //used both with denoise 1 2 3 float refine = 0.f; for (int i = 0; i < W_L * H_L; i++) { @@ -3064,10 +3031,10 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit mea[8] = mean[level] + 2.5f * sigma[level]; //99% bool useChromAndHue = (skinprot != 0.f || cp.HSmet); - float modchro, kLlev; + float modchro; for (int i = 0; i < W_L * H_L; i++) { - kLlev = 1.f; + float kLlev = 1.f; if(cpMul < 0.f) { beta = 1.f; // disabled for negatives values "less contrast" @@ -3217,15 +3184,13 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit it = itmoins; } else if(level == med) { it = 7; - } else if(level > med) { + } else /*if(level > med)*/ { it = itplus; } for(int j = 0; j < it; j++) { //float bal = cp.balan;//-100 +100 float kba = 1.f; - float k1; - float k2; // if(dir <3) kba= 1.f + bal/600.f; // if(dir==3) kba = 1.f - bal/300.f; @@ -3233,8 +3198,8 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit int ii = i / W_L; int jj = i - ii * W_L; float LL100 = labco->L[ii * 2][jj * 2] / 327.68f; - k1 = 0.3f * (waOpacityCurveW[6.f * LL100] - 0.5f); //k1 between 0 and 0.5 0.5==> 1/6=0.16 - k2 = k1 * 2.f; + float k1 = 0.3f * (waOpacityCurveW[6.f * LL100] - 0.5f); //k1 between 0 and 0.5 0.5==> 1/6=0.16 + float k2 = k1 * 2.f; if(dir < 3) { kba = 1.f + k1; @@ -3260,23 +3225,21 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit it = itmoins; } else if(level == med) { it = 7; - } else if(level > med) { + } else /*if(level > med)*/ { it = itplus; } for(int j = 0; j < it; j++) { float bal = cp.balan;//-100 +100 float kba = 1.f; - float k1; - float k2; // if(dir <3) kba= 1.f + bal/600.f; // if(dir==3) kba = 1.f - bal/300.f; for (int i = 0; i < W_L * H_L; i++) { int ii = i / W_L; int jj = i - ii * W_L; - k1 = 600.f; - k2 = 300.f; + float k1 = 600.f; + float k2 = 300.f; float LL100 = labco->L[ii * 2][jj * 2] / 327.68f; float aa = 4970.f; float bb = -397000.f; @@ -3362,7 +3325,6 @@ void ImProcFunctions::ContAllAB (LabImage * labco, int maxlvl, float ** varhue, // if( (cp.curv || cp.CHSLmet==1) && cp.CHmet!=2 && level < 9 && cpMulC != 0.f) { // cpMulC == 0.f means all will be multiplied by 1.f, so we can skip if( cp.CHmet != 2 && level < 9 && cpMulC != 0.f && cp.chromena) { // cpMulC == 0.f means all will be multiplied by 1.f, so we can skip - float modchro, modhue, kClev; const float skinprot = params->wavelet.skinprotect; const float skinprotneg = -skinprot; const float factorHard = (1.f - skinprotneg / 100.f); @@ -3372,15 +3334,13 @@ void ImProcFunctions::ContAllAB (LabImage * labco, int maxlvl, float ** varhue, int ii = i / W_ab; int jj = i - ii * W_ab; //WL and W_ab are identical - float LL = labco->L[ii * 2][jj * 2]; - float LL100 = LL / 327.68f; float scale = 1.f; - modchro = varchrom[ii * 2][jj * 2]; + float modchro = varchrom[ii * 2][jj * 2]; if(useSkinControl) { // hue chroma skin with initial lab datas - modhue = varhue[ii][jj]; - scale = 1.f; + float LL100 = labco->L[ii * 2][jj * 2] / 327.68f; + float modhue = varhue[ii][jj]; if(skinprot > 0.f) { Color::SkinSatCbdl2 (LL100, modhue, modchro, skinprot, scale, true, cp.b_l, cp.t_l, cp.t_r, cp.b_r, 1); //1 for curve @@ -3396,7 +3356,7 @@ void ImProcFunctions::ContAllAB (LabImage * labco, int maxlvl, float ** varhue, beta = 0.02f; } - kClev = beta; + float kClev = beta; if(cp.CHmet == 1) { if(level < cp.chrom) { @@ -3478,15 +3438,13 @@ void ImProcFunctions::ContAllAB (LabImage * labco, int maxlvl, float ** varhue, it = itmoins; } else if(level == med) { it = 7; - } else if(level > med) { + } else /*if(level > med)*/ { it = itplus; } for(int j = 0; j < it; j++) { //float bal = cp.balan;//-100 +100 float kba = 1.f; - float k1; - float k2; // if(dir <3) kba= 1.f + bal/600.f; // if(dir==3) kba = 1.f - bal/300.f; @@ -3494,8 +3452,8 @@ void ImProcFunctions::ContAllAB (LabImage * labco, int maxlvl, float ** varhue, int ii = i / W_ab; int jj = i - ii * W_ab; float LL100 = labco->L[ii * 2][jj * 2] / 327.68f; - k1 = 0.3f * (waOpacityCurveW[6.f * LL100] - 0.5f); //k1 between 0 and 0.5 0.5==> 1/6=0.16 - k2 = k1 * 2.f; + float k1 = 0.3f * (waOpacityCurveW[6.f * LL100] - 0.5f); //k1 between 0 and 0.5 0.5==> 1/6=0.16 + float k2 = k1 * 2.f; if(dir < 3) { kba = 1.f + k1; @@ -3521,23 +3479,21 @@ void ImProcFunctions::ContAllAB (LabImage * labco, int maxlvl, float ** varhue, it = itmoins; } else if(level == med) { it = 7; - } else if(level > med) { + } else /*if(level > med)*/ { it = itplus; } for(int j = 0; j < it; j++) { float bal = cp.balan;//-100 +100 float kba = 1.f; - float k1; - float k2; // if(dir <3) kba= 1.f + bal/600.f; // if(dir==3) kba = 1.f - bal/300.f; for (int i = 0; i < W_ab * H_ab; i++) { int ii = i / W_ab; int jj = i - ii * W_ab; - k1 = 600.f; - k2 = 300.f; + float k1 = 600.f; + float k2 = 300.f; float LL100 = labco->L[ii * 2][jj * 2] / 327.68f; float aa = 4970.f; float bb = -397000.f; @@ -3606,10 +3562,8 @@ void ImProcFunctions::ContAllAB (LabImage * labco, int maxlvl, float ** varhue, if(choiceClevel < 3) { // not all levels visible, paint residual if(level == 0) { if(cp.backm != 2) { // nothing to change when residual is used as background - float backGroundChroma = (cp.backm == 1) ? 0.f : 0.f; //we can change first to colorized... - for (int i = 0; i < W_ab * H_ab; i++) { - WavCoeffs_ab0[i] = backGroundChroma; + WavCoeffs_ab0[i] = 0.f; } } } diff --git a/rtengine/jaggedarray.h b/rtengine/jaggedarray.h index 4d01747da..153ed2902 100644 --- a/rtengine/jaggedarray.h +++ b/rtengine/jaggedarray.h @@ -17,8 +17,9 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#ifndef JAGGEDARRAY_H -#define JAGGEDARRAY_H +#pragma once + +#include "noncopyable.h" namespace rtengine { @@ -50,7 +51,8 @@ inline void freeJaggedArray (T** const a) } template -class JaggedArray +class JaggedArray : + public NonCopyable { public: JaggedArray (const int W, const int H, const bool initZero = false) @@ -65,10 +67,6 @@ public: } } - JaggedArray (const JaggedArray&) = delete; - JaggedArray& operator= (const JaggedArray&) = delete; - -public: operator T** const () const { return a; @@ -85,5 +83,3 @@ template void freeJaggedArray (JaggedArray&); } // rtengine - -#endif // JAGGEDARRAY_H diff --git a/rtengine/jdatasrc.cc b/rtengine/jdatasrc.cc index ff509301d..0c2a13ed0 100644 --- a/rtengine/jdatasrc.cc +++ b/rtengine/jdatasrc.cc @@ -213,7 +213,7 @@ my_jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile) * This makes it unsafe to use this manager and a different source * manager serially with the same JPEG object. Caveat programmer. */ - if (cinfo->src == NULL) { /* first time for this JPEG object? */ + if (cinfo->src == nullptr) { /* first time for this JPEG object? */ cinfo->src = (struct jpeg_source_mgr *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, sizeof(my_source_mgr)); @@ -231,7 +231,7 @@ my_jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile) src->pub.term_source = my_term_source; src->infile = infile; src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */ - src->pub.next_input_byte = NULL; /* until buffer loaded */ + src->pub.next_input_byte = nullptr; /* until buffer loaded */ } METHODDEF(void) @@ -338,7 +338,7 @@ format_message (j_common_ptr cinfo, char * buffer) { struct jpeg_error_mgr * err = cinfo->err; int msg_code = err->msg_code; - const char * msgtext = NULL; + const char * msgtext = nullptr; const char * msgptr; char ch; boolean isstring; @@ -346,14 +346,14 @@ format_message (j_common_ptr cinfo, char * buffer) /* Look up message string in proper table */ if (msg_code > 0 && msg_code <= err->last_jpeg_message) { msgtext = err->jpeg_message_table[msg_code]; - } else if (err->addon_message_table != NULL && + } else if (err->addon_message_table != nullptr && msg_code >= err->first_addon_message && msg_code <= err->last_addon_message) { msgtext = err->addon_message_table[msg_code - err->first_addon_message]; } /* Defend against bogus message number */ - if (msgtext == NULL) { + if (msgtext == nullptr) { err->msg_parm.i[0] = msg_code; msgtext = err->jpeg_message_table[0]; } @@ -419,7 +419,7 @@ my_jpeg_std_error (struct jpeg_error_mgr * err) err->jpeg_message_table = jpeg_std_message_table; err->last_jpeg_message = (int) JMSG_LASTMSGCODE - 1; - err->addon_message_table = NULL; + err->addon_message_table = nullptr; err->first_addon_message = 0; /* for safety */ err->last_addon_message = 0; diff --git a/rtengine/jpeg_ijg/README b/rtengine/jpeg_ijg/README new file mode 100644 index 000000000..4c8e82e9b --- /dev/null +++ b/rtengine/jpeg_ijg/README @@ -0,0 +1,375 @@ +The Independent JPEG Group's JPEG software +========================================== + +README for release 9b of 17-Jan-2016 +==================================== + +This distribution contains the ninth public release of the Independent JPEG +Group's free JPEG software. You are welcome to redistribute this software and +to use it for any purpose, subject to the conditions under LEGAL ISSUES, below. + +This software is the work of Tom Lane, Guido Vollbeding, Philip Gladstone, +Bill Allombert, Jim Boucher, Lee Crocker, Bob Friesenhahn, Ben Jackson, +Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi, Ge' Weijers, +and other members of the Independent JPEG Group. + +IJG is not affiliated with the ISO/IEC JTC1/SC29/WG1 standards committee +(previously known as JPEG, together with ITU-T SG16). + + +DOCUMENTATION ROADMAP +===================== + +This file contains the following sections: + +OVERVIEW General description of JPEG and the IJG software. +LEGAL ISSUES Copyright, lack of warranty, terms of distribution. +REFERENCES Where to learn more about JPEG. +ARCHIVE LOCATIONS Where to find newer versions of this software. +ACKNOWLEDGMENTS Special thanks. +FILE FORMAT WARS Software *not* to get. +TO DO Plans for future IJG releases. + +Other documentation files in the distribution are: + +User documentation: + install.txt How to configure and install the IJG software. + usage.txt Usage instructions for cjpeg, djpeg, jpegtran, + rdjpgcom, and wrjpgcom. + *.1 Unix-style man pages for programs (same info as usage.txt). + wizard.txt Advanced usage instructions for JPEG wizards only. + change.log Version-to-version change highlights. +Programmer and internal documentation: + libjpeg.txt How to use the JPEG library in your own programs. + example.c Sample code for calling the JPEG library. + structure.txt Overview of the JPEG library's internal structure. + filelist.txt Road map of IJG files. + coderules.txt Coding style rules --- please read if you contribute code. + +Please read at least the files install.txt and usage.txt. Some information +can also be found in the JPEG FAQ (Frequently Asked Questions) article. See +ARCHIVE LOCATIONS below to find out where to obtain the FAQ article. + +If you want to understand how the JPEG code works, we suggest reading one or +more of the REFERENCES, then looking at the documentation files (in roughly +the order listed) before diving into the code. + + +OVERVIEW +======== + +This package contains C software to implement JPEG image encoding, decoding, +and transcoding. JPEG (pronounced "jay-peg") is a standardized compression +method for full-color and grayscale images. + +This software implements JPEG baseline, extended-sequential, and progressive +compression processes. Provision is made for supporting all variants of these +processes, although some uncommon parameter settings aren't implemented yet. +We have made no provision for supporting the hierarchical or lossless +processes defined in the standard. + +We provide a set of library routines for reading and writing JPEG image files, +plus two sample applications "cjpeg" and "djpeg", which use the library to +perform conversion between JPEG and some other popular image file formats. +The library is intended to be reused in other applications. + +In order to support file conversion and viewing software, we have included +considerable functionality beyond the bare JPEG coding/decoding capability; +for example, the color quantization modules are not strictly part of JPEG +decoding, but they are essential for output to colormapped file formats or +colormapped displays. These extra functions can be compiled out of the +library if not required for a particular application. + +We have also included "jpegtran", a utility for lossless transcoding between +different JPEG processes, and "rdjpgcom" and "wrjpgcom", two simple +applications for inserting and extracting textual comments in JFIF files. + +The emphasis in designing this software has been on achieving portability and +flexibility, while also making it fast enough to be useful. In particular, +the software is not intended to be read as a tutorial on JPEG. (See the +REFERENCES section for introductory material.) Rather, it is intended to +be reliable, portable, industrial-strength code. We do not claim to have +achieved that goal in every aspect of the software, but we strive for it. + +We welcome the use of this software as a component of commercial products. +No royalty is required, but we do ask for an acknowledgement in product +documentation, as described under LEGAL ISSUES. + + +LEGAL ISSUES +============ + +In plain English: + +1. We don't promise that this software works. (But if you find any bugs, + please let us know!) +2. You can use this software for whatever you want. You don't have to pay us. +3. You may not pretend that you wrote this software. If you use it in a + program, you must acknowledge somewhere in your documentation that + you've used the IJG code. + +In legalese: + +The authors make NO WARRANTY or representation, either express or implied, +with respect to this software, its quality, accuracy, merchantability, or +fitness for a particular purpose. This software is provided "AS IS", and you, +its user, assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1991-2016, Thomas G. Lane, Guido Vollbeding. +All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this +software (or portions thereof) for any purpose, without fee, subject to these +conditions: +(1) If any part of the source code for this software is distributed, then this +README file must be included, with this copyright and no-warranty notice +unaltered; and any additions, deletions, or changes to the original files +must be clearly indicated in accompanying documentation. +(2) If only executable code is distributed, then the accompanying +documentation must state that "this software is based in part on the work of +the Independent JPEG Group". +(3) Permission for use of this software is granted only if the user accepts +full responsibility for any undesirable consequences; the authors accept +NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, +not just to the unmodified library. If you use our work, you ought to +acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name +in advertising or publicity relating to this software or products derived from +it. This software may be referred to only as "the Independent JPEG Group's +software". + +We specifically permit and encourage the use of this software as the basis of +commercial products, provided that all warranty or liability claims are +assumed by the product vendor. + + +The Unix configuration script "configure" was produced with GNU Autoconf. +It is copyright by the Free Software Foundation but is freely distributable. +The same holds for its supporting scripts (config.guess, config.sub, +ltmain.sh). Another support script, install-sh, is copyright by X Consortium +but is also freely distributable. + +The IJG distribution formerly included code to read and write GIF files. +To avoid entanglement with the Unisys LZW patent (now expired), GIF reading +support has been removed altogether, and the GIF writer has been simplified +to produce "uncompressed GIFs". This technique does not use the LZW +algorithm; the resulting GIF files are larger than usual, but are readable +by all standard GIF decoders. + + +REFERENCES +========== + +We recommend reading one or more of these references before trying to +understand the innards of the JPEG software. + +The best short technical introduction to the JPEG compression algorithm is + Wallace, Gregory K. "The JPEG Still Picture Compression Standard", + Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44. +(Adjacent articles in that issue discuss MPEG motion picture compression, +applications of JPEG, and related topics.) If you don't have the CACM issue +handy, a PDF file containing a revised version of Wallace's article is +available at http://www.ijg.org/files/Wallace.JPEG.pdf. The file (actually +a preprint for an article that appeared in IEEE Trans. Consumer Electronics) +omits the sample images that appeared in CACM, but it includes corrections +and some added material. Note: the Wallace article is copyright ACM and IEEE, +and it may not be used for commercial purposes. + +A somewhat less technical, more leisurely introduction to JPEG can be found in +"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by +M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1. This book provides +good explanations and example C code for a multitude of compression methods +including JPEG. It is an excellent source if you are comfortable reading C +code but don't know much about data compression in general. The book's JPEG +sample code is far from industrial-strength, but when you are ready to look +at a full implementation, you've got one here... + +The best currently available description of JPEG is the textbook "JPEG Still +Image Data Compression Standard" by William B. Pennebaker and Joan L. +Mitchell, published by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. +Price US$59.95, 638 pp. The book includes the complete text of the ISO JPEG +standards (DIS 10918-1 and draft DIS 10918-2). +Although this is by far the most detailed and comprehensive exposition of +JPEG publicly available, we point out that it is still missing an explanation +of the most essential properties and algorithms of the underlying DCT +technology. +If you think that you know about DCT-based JPEG after reading this book, +then you are in delusion. The real fundamentals and corresponding potential +of DCT-based JPEG are not publicly known so far, and that is the reason for +all the mistaken developments taking place in the image coding domain. + +The original JPEG standard is divided into two parts, Part 1 being the actual +specification, while Part 2 covers compliance testing methods. Part 1 is +titled "Digital Compression and Coding of Continuous-tone Still Images, +Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS +10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of +Continuous-tone Still Images, Part 2: Compliance testing" and has document +numbers ISO/IEC IS 10918-2, ITU-T T.83. +IJG JPEG 8 introduced an implementation of the JPEG SmartScale extension +which is specified in two documents: A contributed document at ITU and ISO +with title "ITU-T JPEG-Plus Proposal for Extending ITU-T T.81 for Advanced +Image Coding", April 2006, Geneva, Switzerland. The latest version of this +document is Revision 3. And a contributed document ISO/IEC JTC1/SC29/WG1 N +5799 with title "Evolution of JPEG", June/July 2011, Berlin, Germany. +IJG JPEG 9 introduces a reversible color transform for improved lossless +compression which is described in a contributed document ISO/IEC JTC1/SC29/ +WG1 N 6080 with title "JPEG 9 Lossless Coding", June/July 2012, Paris, +France. + +The JPEG standard does not specify all details of an interchangeable file +format. For the omitted details we follow the "JFIF" conventions, version 2. +JFIF version 1 has been adopted as Recommendation ITU-T T.871 (05/2011) : +Information technology - Digital compression and coding of continuous-tone +still images: JPEG File Interchange Format (JFIF). It is available as a +free download in PDF file format from http://www.itu.int/rec/T-REC-T.871. +A PDF file of the older JFIF document is available at +http://www.w3.org/Graphics/JPEG/jfif3.pdf. + +The TIFF 6.0 file format specification can be obtained by FTP from +ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme +found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems. +IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6). +Instead, we recommend the JPEG design proposed by TIFF Technical Note #2 +(Compression tag 7). Copies of this Note can be obtained from +http://www.ijg.org/files/. It is expected that the next revision +of the TIFF spec will replace the 6.0 JPEG design with the Note's design. +Although IJG's own code does not support TIFF/JPEG, the free libtiff library +uses our library to implement TIFF/JPEG per the Note. + + +ARCHIVE LOCATIONS +================= + +The "official" archive site for this software is www.ijg.org. +The most recent released version can always be found there in +directory "files". This particular version will be archived as +http://www.ijg.org/files/jpegsrc.v9b.tar.gz, and in Windows-compatible +"zip" archive format as http://www.ijg.org/files/jpegsr9b.zip. + +The JPEG FAQ (Frequently Asked Questions) article is a source of some +general information about JPEG. +It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/ +and other news.answers archive sites, including the official news.answers +archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/. +If you don't have Web or FTP access, send e-mail to mail-server@rtfm.mit.edu +with body + send usenet/news.answers/jpeg-faq/part1 + send usenet/news.answers/jpeg-faq/part2 + + +ACKNOWLEDGMENTS +=============== + +Thank to Juergen Bruder for providing me with a copy of the common DCT +algorithm article, only to find out that I had come to the same result +in a more direct and comprehensible way with a more generative approach. + +Thank to Istvan Sebestyen and Joan L. Mitchell for inviting me to the +ITU JPEG (Study Group 16) meeting in Geneva, Switzerland. + +Thank to Thomas Wiegand and Gary Sullivan for inviting me to the +Joint Video Team (MPEG & ITU) meeting in Geneva, Switzerland. + +Thank to Thomas Richter and Daniel Lee for inviting me to the +ISO/IEC JTC1/SC29/WG1 (previously known as JPEG, together with ITU-T SG16) +meeting in Berlin, Germany. + +Thank to John Korejwa and Massimo Ballerini for inviting me to +fruitful consultations in Boston, MA and Milan, Italy. + +Thank to Hendrik Elstner, Roland Fassauer, Simone Zuck, Guenther +Maier-Gerber, Walter Stoeber, Fred Schmitz, and Norbert Braunagel +for corresponding business development. + +Thank to Nico Zschach and Dirk Stelling of the technical support team +at the Digital Images company in Halle for providing me with extra +equipment for configuration tests. + +Thank to Richard F. Lyon (then of Foveon Inc.) for fruitful +communication about JPEG configuration in Sigma Photo Pro software. + +Thank to Andrew Finkenstadt for hosting the ijg.org site. + +Last but not least special thank to Thomas G. Lane for the original +design and development of this singular software package. + + +FILE FORMAT WARS +================ + +The ISO/IEC JTC1/SC29/WG1 standards committee (previously known as JPEG, +together with ITU-T SG16) currently promotes different formats containing +the name "JPEG" which is misleading because these formats are incompatible +with original DCT-based JPEG and are based on faulty technologies. +IJG therefore does not and will not support such momentary mistakes +(see REFERENCES). +There exist also distributions under the name "OpenJPEG" promoting such +kind of formats which is misleading because they don't support original +JPEG images. +We have no sympathy for the promotion of inferior formats. Indeed, one of +the original reasons for developing this free software was to help force +convergence on common, interoperable format standards for JPEG files. +Don't use an incompatible file format! +(In any case, our decoder will remain capable of reading existing JPEG +image files indefinitely.) + +The ISO committee pretends to be "responsible for the popular JPEG" in their +public reports which is not true because they don't respond to actual +requirements for the maintenance of the original JPEG specification. +Furthermore, the ISO committee pretends to "ensure interoperability" with +their standards which is not true because their "standards" support only +application-specific and proprietary use cases and contain mathematically +incorrect code. + +There are currently different distributions in circulation containing the +name "libjpeg" which is misleading because they don't have the features and +are incompatible with formats supported by actual IJG libjpeg distributions. +One of those fakes is released by members of the ISO committee and just uses +the name of libjpeg for misdirection of people, similar to the abuse of the +name JPEG as described above, while having nothing in common with actual IJG +libjpeg distributions and containing mathematically incorrect code. +The other one claims to be a "derivative" or "fork" of the original libjpeg, +but violates the license conditions as described under LEGAL ISSUES above +and violates basic C programming properties. +We have no sympathy for the release of misleading, incorrect and illegal +distributions derived from obsolete code bases. +Don't use an obsolete code base! + +According to the UCC (Uniform Commercial Code) law, IJG has the lawful and +legal right to foreclose on certain standardization bodies and other +institutions or corporations that knowingly perform substantial and +systematic deceptive acts and practices, fraud, theft, and damaging of the +value of the people of this planet without their knowing, willing and +intentional consent. +The titles, ownership, and rights of these institutions and all their assets +are now duly secured and held in trust for the free people of this planet. +People of the planet, on every country, may have a financial interest in +the assets of these former principals, agents, and beneficiaries of the +foreclosed institutions and corporations. +IJG asserts what is: that each man, woman, and child has unalienable value +and rights granted and deposited in them by the Creator and not any one of +the people is subordinate to any artificial principality, corporate fiction +or the special interest of another without their appropriate knowing, +willing and intentional consent made by contract or accommodation agreement. +IJG expresses that which already was. +The people have already determined and demanded that public administration +entities, national governments, and their supporting judicial systems must +be fully transparent, accountable, and liable. +IJG has secured the value for all concerned free people of the planet. + +A partial list of foreclosed institutions and corporations ("Hall of Shame") +is currently prepared and will be published later. + + +TO DO +===== + +Version 9 is the second release of a new generation JPEG standard +to overcome the limitations of the original JPEG specification, +and is the first true source reference JPEG codec. +More features are being prepared for coming releases... + +Please send bug reports, offers of help, etc. to jpeg-info@jpegclub.org. diff --git a/rtengine/jpeg_memsrc.cc b/rtengine/jpeg_ijg/jpeg_memsrc.cc similarity index 98% rename from rtengine/jpeg_memsrc.cc rename to rtengine/jpeg_ijg/jpeg_memsrc.cc index ab4ecf7d6..3e245b87e 100644 --- a/rtengine/jpeg_memsrc.cc +++ b/rtengine/jpeg_ijg/jpeg_memsrc.cc @@ -22,7 +22,7 @@ #include #include #include -#include "jpeg.h" +#include "../jpeg.h" /* Expanded data source object for memory input */ @@ -155,7 +155,7 @@ jpeg_memory_src (j_decompress_ptr cinfo, const JOCTET * buffer, size_t bufsize) * This makes it unsafe to use this manager and a different source * manager serially with the same JPEG object. Caveat programmer. */ - if (cinfo->src == NULL) { /* first time for this JPEG object? */ + if (cinfo->src == nullptr) { /* first time for this JPEG object? */ cinfo->src = (struct jpeg_source_mgr *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, sizeof(my_source_mgr)); diff --git a/rtengine/klt/convolve.cc b/rtengine/klt/convolve.cc index b6041a7a6..7a2785cca 100644 --- a/rtengine/klt/convolve.cc +++ b/rtengine/klt/convolve.cc @@ -250,8 +250,8 @@ static void _convolveImageVert( static void _convolveSeparate( _KLT_FloatImage imgin, - ConvolutionKernel horiz_kernel, - ConvolutionKernel vert_kernel, + const ConvolutionKernel &horiz_kernel, + const ConvolutionKernel &vert_kernel, _KLT_FloatImage imgout) { /* Create temporary image */ diff --git a/rtengine/klt/klt.cc b/rtengine/klt/klt.cc index 831914754..54bb2f93a 100644 --- a/rtengine/klt/klt.cc +++ b/rtengine/klt/klt.cc @@ -73,7 +73,7 @@ static void** _createArray2D(int ncols, int nrows, int nbytes) tt = (char **) malloc(nrows * sizeof(void *) + ncols * nrows * nbytes); - if (tt == NULL) { + if (tt == nullptr) { KLTError("(createArray2D) Out of memory"); exit(1); } @@ -115,9 +115,9 @@ KLT_TrackingContext KLTCreateTrackingContext() tc->pyramid_sigma_fact = pyramid_sigma_fact; tc->step_factor = step_factor; tc->nSkippedPixels = nSkippedPixels; - tc->pyramid_last = NULL; - tc->pyramid_last_gradx = NULL; - tc->pyramid_last_grady = NULL; + tc->pyramid_last = nullptr; + tc->pyramid_last_gradx = nullptr; + tc->pyramid_last_grady = nullptr; /* for affine mapping */ tc->affineConsistencyCheck = affineConsistencyCheck; tc->affine_window_width = affine_window_size; @@ -164,9 +164,9 @@ KLT_FeatureList KLTCreateFeatureList( first = (KLT_Feature) (fl->feature + nFeatures); for (i = 0 ; i < nFeatures ; i++) { fl->feature[i] = first + i; - fl->feature[i]->aff_img = NULL; /* initialization fixed by Sinisa Segvic */ - fl->feature[i]->aff_img_gradx = NULL; - fl->feature[i]->aff_img_grady = NULL; + fl->feature[i]->aff_img = nullptr; /* initialization fixed by Sinisa Segvic */ + fl->feature[i]->aff_img_gradx = nullptr; + fl->feature[i]->aff_img_grady = nullptr; } /* Return feature list */ return(fl); @@ -272,13 +272,13 @@ void KLTPrintTrackingContext( fprintf(stderr, "\tnPyramidLevels = %d\n", tc->nPyramidLevels); fprintf(stderr, "\tsubsampling = %d\n", tc->subsampling); - fprintf(stderr, "\n\tpyramid_last = %s\n", (tc->pyramid_last!=NULL) ? + fprintf(stderr, "\n\tpyramid_last = %s\n", (tc->pyramid_last!=nullptr) ? "points to old image" : "NULL"); fprintf(stderr, "\tpyramid_last_gradx = %s\n", - (tc->pyramid_last_gradx!=NULL) ? + (tc->pyramid_last_gradx!=nullptr) ? "points to old image" : "NULL"); fprintf(stderr, "\tpyramid_last_grady = %s\n", - (tc->pyramid_last_grady!=NULL) ? + (tc->pyramid_last_grady!=nullptr) ? "points to old image" : "NULL"); fprintf(stderr, "\n\n"); } @@ -464,9 +464,9 @@ void KLTFreeFeatureList( _KLTFreeFloatImage(fl->feature[indx]->aff_img); _KLTFreeFloatImage(fl->feature[indx]->aff_img_gradx); _KLTFreeFloatImage(fl->feature[indx]->aff_img_grady); - fl->feature[indx]->aff_img = NULL; - fl->feature[indx]->aff_img_gradx = NULL; - fl->feature[indx]->aff_img_grady = NULL; + fl->feature[indx]->aff_img = nullptr; + fl->feature[indx]->aff_img_gradx = nullptr; + fl->feature[indx]->aff_img_grady = nullptr; } free(fl); @@ -498,9 +498,9 @@ void KLTStopSequentialMode( _KLTFreePyramid((_KLT_Pyramid) tc->pyramid_last); _KLTFreePyramid((_KLT_Pyramid) tc->pyramid_last_gradx); _KLTFreePyramid((_KLT_Pyramid) tc->pyramid_last_grady); - tc->pyramid_last = NULL; - tc->pyramid_last_gradx = NULL; - tc->pyramid_last_grady = NULL; + tc->pyramid_last = nullptr; + tc->pyramid_last_gradx = nullptr; + tc->pyramid_last_grady = nullptr; } diff --git a/rtengine/klt/klt_util.cc b/rtengine/klt/klt_util.cc index e1fc342f3..c01022445 100644 --- a/rtengine/klt/klt_util.cc +++ b/rtengine/klt/klt_util.cc @@ -40,7 +40,7 @@ _KLT_FloatImage _KLTCreateFloatImage( ncols * nrows * sizeof(float); floatimg = (_KLT_FloatImage) malloc(nbytes); - if (floatimg == NULL) { + if (floatimg == nullptr) { KLTError("(_KLTCreateFloatImage) Out of memory"); exit(1); } diff --git a/rtengine/klt/pnmio.cc b/rtengine/klt/pnmio.cc index de8a1b0d9..b25dc3ca8 100644 --- a/rtengine/klt/pnmio.cc +++ b/rtengine/klt/pnmio.cc @@ -130,7 +130,7 @@ void pgmReadHeaderFile( FILE *fp; /* Open file */ - if ( (fp = fopen(fname, "rb")) == NULL) { + if ( (fp = fopen(fname, "rb")) == nullptr) { KLTError("(pgmReadHeaderFile) Can't open file named '%s' for reading\n", fname); exit(1); } @@ -156,7 +156,7 @@ void ppmReadHeaderFile( FILE *fp; /* Open file */ - if ( (fp = fopen(fname, "rb")) == NULL) { + if ( (fp = fopen(fname, "rb")) == nullptr) { KLTError("(ppmReadHeaderFile) Can't open file named '%s' for reading\n", fname); exit(1); } @@ -188,9 +188,9 @@ unsigned char* pgmRead( pgmReadHeader(fp, &magic, ncols, nrows, &maxval); /* Allocate memory, if necessary, and set pointer */ - if (img == NULL) { + if (img == nullptr) { ptr = (unsigned char *) malloc(*ncols * *nrows * sizeof(char)); - if (ptr == NULL) { + if (ptr == nullptr) { KLTError("(pgmRead) Memory not allocated"); exit(1); } @@ -226,7 +226,7 @@ unsigned char* pgmReadFile( FILE *fp; /* Open file */ - if ( (fp = fopen(fname, "rb")) == NULL) { + if ( (fp = fopen(fname, "rb")) == nullptr) { KLTError("(pgmReadFile) Can't open file named '%s' for reading\n", fname); exit(1); } @@ -279,7 +279,7 @@ void pgmWriteFile( FILE *fp; /* Open file */ - if ( (fp = fopen(fname, "wb")) == NULL) { + if ( (fp = fopen(fname, "wb")) == nullptr) { KLTError("(pgmWriteFile) Can't open file named '%s' for writing\n", fname); exit(1); } @@ -338,7 +338,7 @@ void ppmWriteFileRGB( FILE *fp; /* Open file */ - if ( (fp = fopen(fname, "wb")) == NULL) { + if ( (fp = fopen(fname, "wb")) == nullptr) { KLTError("(ppmWriteFileRGB) Can't open file named '%s' for writing\n", fname); exit(1); } diff --git a/rtengine/klt/pyramid.cc b/rtengine/klt/pyramid.cc index e8b9f47ec..e72ffb237 100644 --- a/rtengine/klt/pyramid.cc +++ b/rtengine/klt/pyramid.cc @@ -43,7 +43,7 @@ _KLT_Pyramid _KLTCreatePyramid( /* Allocate memory for structure and set parameters */ pyramid = (_KLT_Pyramid) malloc(nbytes); - if (pyramid == NULL) { + if (pyramid == nullptr) { KLTError("(_KLTCreatePyramid) Out of memory"); exit(1); } diff --git a/rtengine/klt/selectGoodFeatures.cc b/rtengine/klt/selectGoodFeatures.cc index 176057f39..20e67fb2e 100644 --- a/rtengine/klt/selectGoodFeatures.cc +++ b/rtengine/klt/selectGoodFeatures.cc @@ -179,9 +179,9 @@ static void _enforceMinimumDistance( featurelist->feature[indx]->x = -1; featurelist->feature[indx]->y = -1; featurelist->feature[indx]->val = KLT_NOT_FOUND; - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; featurelist->feature[indx]->aff_x = -1.0; featurelist->feature[indx]->aff_y = -1.0; featurelist->feature[indx]->aff_Axx = 1.0; @@ -217,9 +217,9 @@ static void _enforceMinimumDistance( featurelist->feature[indx]->x = (KLT_locType) x; featurelist->feature[indx]->y = (KLT_locType) y; featurelist->feature[indx]->val = (int) val; - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; featurelist->feature[indx]->aff_x = -1.0; featurelist->feature[indx]->aff_y = -1.0; featurelist->feature[indx]->aff_Axx = 1.0; @@ -340,12 +340,12 @@ void _KLTSelectGoodFeatures( /* Create temporary images, etc. */ if (mode == REPLACING_SOME && - tc->sequentialMode && tc->pyramid_last != NULL) { + tc->sequentialMode && tc->pyramid_last != nullptr) { floatimg = ((_KLT_Pyramid) tc->pyramid_last)->img[0]; gradx = ((_KLT_Pyramid) tc->pyramid_last_gradx)->img[0]; grady = ((_KLT_Pyramid) tc->pyramid_last_grady)->img[0]; - assert(gradx != NULL); - assert(grady != NULL); + assert(gradx != nullptr); + assert(grady != nullptr); } else { floatimages_created = TRUE; floatimg = _KLTCreateFloatImage(ncols, nrows); diff --git a/rtengine/klt/trackFeatures.cc b/rtengine/klt/trackFeatures.cc index 3ade7264f..5930e2fcb 100644 --- a/rtengine/klt/trackFeatures.cc +++ b/rtengine/klt/trackFeatures.cc @@ -317,7 +317,7 @@ static _FloatWindow _allocateFloatWindow( _FloatWindow fw; fw = (_FloatWindow) malloc(width*height*sizeof(float)); - if (fw == NULL) { + if (fw == nullptr) { KLTError("(_allocateFloatWindow) Out of memory."); exit(1); } @@ -1291,7 +1291,7 @@ void KLTTrackFeatures( /* Process first image by converting to float, smoothing, computing */ /* pyramid, and computing gradient pyramids */ - if (tc->sequentialMode && tc->pyramid_last != NULL) { + if (tc->sequentialMode && tc->pyramid_last != nullptr) { pyramid1 = (_KLT_Pyramid) tc->pyramid_last; pyramid1_gradx = (_KLT_Pyramid) tc->pyramid_last_gradx; pyramid1_grady = (_KLT_Pyramid) tc->pyramid_last_grady; @@ -1301,8 +1301,8 @@ void KLTTrackFeatures( ncols, nrows, pyramid1->ncols[0], pyramid1->nrows[0]); exit(1); } - assert(pyramid1_gradx != NULL); - assert(pyramid1_grady != NULL); + assert(pyramid1_gradx != nullptr); + assert(pyramid1_grady != nullptr); } else { floatimg1_created = TRUE; floatimg1 = _KLTCreateFloatImage(ncols, nrows); @@ -1398,9 +1398,9 @@ void KLTTrackFeatures( if( featurelist->feature[indx]->aff_img ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img); if( featurelist->feature[indx]->aff_img_gradx ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_gradx); if( featurelist->feature[indx]->aff_img_grady ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_grady); - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; } else if (_outOfBounds(xlocout, ylocout, ncols, nrows, tc->borderx, tc->bordery)) { featurelist->feature[indx]->x = -1.0; @@ -1409,9 +1409,9 @@ void KLTTrackFeatures( if( featurelist->feature[indx]->aff_img ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img); if( featurelist->feature[indx]->aff_img_gradx ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_gradx); if( featurelist->feature[indx]->aff_img_grady ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_grady); - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; } else if (val == KLT_SMALL_DET) { featurelist->feature[indx]->x = -1.0; featurelist->feature[indx]->y = -1.0; @@ -1419,9 +1419,9 @@ void KLTTrackFeatures( if( featurelist->feature[indx]->aff_img ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img); if( featurelist->feature[indx]->aff_img_gradx ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_gradx); if( featurelist->feature[indx]->aff_img_grady ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_grady); - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; } else if (val == KLT_LARGE_RESIDUE) { featurelist->feature[indx]->x = -1.0; featurelist->feature[indx]->y = -1.0; @@ -1429,9 +1429,9 @@ void KLTTrackFeatures( if( featurelist->feature[indx]->aff_img ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img); if( featurelist->feature[indx]->aff_img_gradx ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_gradx); if( featurelist->feature[indx]->aff_img_grady ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_grady); - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; } else if (val == KLT_MAX_ITERATIONS) { featurelist->feature[indx]->x = -1.0; featurelist->feature[indx]->y = -1.0; @@ -1439,9 +1439,9 @@ void KLTTrackFeatures( if( featurelist->feature[indx]->aff_img ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img); if( featurelist->feature[indx]->aff_img_gradx ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_gradx); if( featurelist->feature[indx]->aff_img_grady ) _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_grady); - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; } else { featurelist->feature[indx]->x = xlocout; featurelist->feature[indx]->y = ylocout; @@ -1497,9 +1497,9 @@ void KLTTrackFeatures( _KLTFreeFloatImage(featurelist->feature[indx]->aff_img); _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_gradx); _KLTFreeFloatImage(featurelist->feature[indx]->aff_img_grady); - featurelist->feature[indx]->aff_img = NULL; - featurelist->feature[indx]->aff_img_gradx = NULL; - featurelist->feature[indx]->aff_img_grady = NULL; + featurelist->feature[indx]->aff_img = nullptr; + featurelist->feature[indx]->aff_img_gradx = nullptr; + featurelist->feature[indx]->aff_img_grady = nullptr; }else{ /*featurelist->feature[indx]->x = xlocout;*/ /*featurelist->feature[indx]->y = ylocout;*/ diff --git a/rtengine/klt/writeFeatures.cc b/rtengine/klt/writeFeatures.cc index d902778de..1bfe3f20f 100644 --- a/rtengine/klt/writeFeatures.cc +++ b/rtengine/klt/writeFeatures.cc @@ -56,7 +56,7 @@ void KLTWriteFeatureListToPPM( redimg = (uchar *) malloc(nbytes); grnimg = (uchar *) malloc(nbytes); bluimg = (uchar *) malloc(nbytes); - if (redimg == NULL || grnimg == NULL || bluimg == NULL) { + if (redimg == nullptr || grnimg == nullptr || bluimg == nullptr) { KLTError("(KLTWriteFeaturesToPPM) Out of memory\n"); exit(1); } @@ -104,9 +104,9 @@ static FILE* _printSetupTxt( int i; /* Either open file or use stderr */ - if (fname == NULL) fp = stderr; + if (fname == nullptr) fp = stderr; else fp = fopen(fname, "wb"); - if (fp == NULL) { + if (fp == nullptr) { KLTError("(KLTWriteFeatures) " "Can't open file '%s' for writing\n", fname); exit(1); @@ -134,12 +134,12 @@ static FILE* _printSetupBin( const char *fname) /* Input: filename */ { FILE *fp; - if (fname == NULL) { + if (fname == nullptr) { KLTError("(KLTWriteFeatures) Can't write binary data to stderr"); exit(1); } fp = fopen(fname, "wb"); - if (fp == NULL) { + if (fp == nullptr) { KLTError("(KLTWriteFeatures) " "Can't open file '%s' for writing", fname); exit(1); @@ -351,13 +351,13 @@ void KLTWriteFeatureList( char type; int i; - if (KLT_verbose >= 1 && fname != NULL) { + if (KLT_verbose >= 1 && fname != nullptr) { fprintf(stderr, "(KLT) Writing feature list to %s file: '%s'\n", - (fmt == NULL ? "binary" : "text"), fname); + (fmt == nullptr ? "binary" : "text"), fname); } - if (fmt != NULL) { /* text file or stderr */ + if (fmt != nullptr) { /* text file or stderr */ fp = _printSetupTxt(fname, fmt, format, &type); _printHeader(fp, format, FEATURE_LIST, 0, fl->nFeatures); @@ -389,13 +389,13 @@ void KLTWriteFeatureHistory( char type; int i; - if (KLT_verbose >= 1 && fname != NULL) { + if (KLT_verbose >= 1 && fname != nullptr) { fprintf(stderr, "(KLT) Writing feature history to %s file: '%s'\n", - (fmt == NULL ? "binary" : "text"), fname); + (fmt == nullptr ? "binary" : "text"), fname); } - if (fmt != NULL) { /* text file or stderr */ + if (fmt != nullptr) { /* text file or stderr */ fp = _printSetupTxt(fname, fmt, format, &type); _printHeader(fp, format, FEATURE_HISTORY, fh->nFrames, 0); @@ -428,13 +428,13 @@ void KLTWriteFeatureTable( char type; int i, j; - if (KLT_verbose >= 1 && fname != NULL) { + if (KLT_verbose >= 1 && fname != nullptr) { fprintf(stderr, "(KLT) Writing feature table to %s file: '%s'\n", - (fmt == NULL ? "binary" : "text"), fname); + (fmt == nullptr ? "binary" : "text"), fname); } - if (fmt != NULL) { /* text file or stderr */ + if (fmt != nullptr) { /* text file or stderr */ fp = _printSetupTxt(fname, fmt, format, &type); _printHeader(fp, format, FEATURE_TABLE, ft->nFrames, ft->nFeatures); @@ -475,18 +475,18 @@ static structureType _readHeader( fread(line, sizeof(char), BINHEADERLENGTH, fp); line[BINHEADERLENGTH] = 0; if (strcmp(line, binheader_fl) == 0) { - assert(nFeatures != NULL); + assert(nFeatures != nullptr); fread(nFeatures, sizeof(int), 1, fp); *binary = TRUE; return FEATURE_LIST; } else if (strcmp(line, binheader_fh) == 0) { - assert(nFrames != NULL); + assert(nFrames != nullptr); fread(nFrames, sizeof(int), 1, fp); *binary = TRUE; return FEATURE_HISTORY; } else if (strcmp(line, binheader_ft) == 0) { - assert(nFrames != NULL); - assert(nFeatures != NULL); + assert(nFrames != nullptr); + assert(nFeatures != nullptr); fread(nFrames, sizeof(int), 1, fp); fread(nFeatures, sizeof(int), 1, fp); *binary = TRUE; @@ -525,9 +525,9 @@ static structureType _readHeader( /* and the parameters passed, exit now before we attempt */ /* to write to non-allocated memory. Higher routine should */ /* detect and handle this error. */ - if ((id == FEATURE_LIST && nFeatures == NULL) || - (id == FEATURE_HISTORY && nFrames == NULL) || - (id == FEATURE_TABLE && (nFeatures == NULL || nFrames == NULL))) + if ((id == FEATURE_LIST && nFeatures == nullptr) || + (id == FEATURE_HISTORY && nFrames == nullptr) || + (id == FEATURE_TABLE && (nFeatures == nullptr || nFrames == nullptr))) return id; /* Read nFeatures and nFrames */ @@ -627,21 +627,21 @@ KLT_FeatureList KLTReadFeatureList( int i; fp = fopen(fname, "rb"); - if (fp == NULL) { + if (fp == nullptr) { KLTError("(KLTReadFeatureList) Can't open file '%s' " "for reading", fname); exit(1); } if (KLT_verbose >= 1) fprintf(stderr, "(KLT) Reading feature list from '%s'\n", fname); - id = _readHeader(fp, NULL, &nFeatures, &binary); + id = _readHeader(fp, nullptr, &nFeatures, &binary); if (id != FEATURE_LIST) { KLTError("(KLTReadFeatureList) File '%s' does not contain " "a FeatureList", fname); exit(1); } - if (fl_in == NULL) { + if (fl_in == nullptr) { fl = KLTCreateFeatureList(nFeatures); fl->nFeatures = nFeatures; } @@ -690,20 +690,20 @@ KLT_FeatureHistory KLTReadFeatureHistory( int i; fp = fopen(fname, "rb"); - if (fp == NULL) { + if (fp == nullptr) { KLTError("(KLTReadFeatureHistory) Can't open file '%s' " "for reading", fname); exit(1); } if (KLT_verbose >= 1) fprintf(stderr, "(KLT) Reading feature history from '%s'\n", fname); - id = _readHeader(fp, &nFrames, NULL, &binary); + id = _readHeader(fp, &nFrames, nullptr, &binary); if (id != FEATURE_HISTORY) { KLTError("(KLTReadFeatureHistory) File '%s' does not contain " "a FeatureHistory", fname); exit(1); } - if (fh_in == NULL) { + if (fh_in == nullptr) { fh = KLTCreateFeatureHistory(nFrames); fh->nFrames = nFrames; } @@ -753,7 +753,7 @@ KLT_FeatureTable KLTReadFeatureTable( int i, j; fp = fopen(fname, "rb"); - if (fp == NULL) { + if (fp == nullptr) { KLTError("(KLTReadFeatureTable) Can't open file '%s' " "for reading", fname); exit(1); @@ -766,7 +766,7 @@ KLT_FeatureTable KLTReadFeatureTable( exit(1); } - if (ft_in == NULL) { + if (ft_in == nullptr) { ft = KLTCreateFeatureTable(nFrames, nFeatures); ft->nFrames = nFrames; ft->nFeatures = nFeatures; diff --git a/rtengine/lcp.cc b/rtengine/lcp.cc index 1ed601301..ce1a6c67e 100644 --- a/rtengine/lcp.cc +++ b/rtengine/lcp.cc @@ -163,7 +163,7 @@ void LCPPersModel::print() const LCPMapper::LCPMapper(LCPProfile* pProf, float focalLength, float focalLength35mm, float focusDist, float aperture, bool vignette, bool useCADistP, int fullWidth, int fullHeight, const CoarseTransformParams& coarse, int rawRotationDeg) { - if (pProf == NULL) { + if (pProf == nullptr) { return; } @@ -182,7 +182,7 @@ LCPMapper::LCPMapper(LCPProfile* pProf, float focalLength, float focalLength35mm bool mirrorY = (rot == 180 || rot == 270); //printf("Vign: %i, fullWidth: %i/%i, focLen %g SwapXY: %i / MirX/Y %i / %i on rot:%i from %i\n",vignette, fullWidth, fullHeight, focalLength, swapXY, mirrorX, mirrorY, rot, rawRotationDeg); - pProf->calcParams(vignette ? 0 : 1, focalLength, focusDist, aperture, &mc, NULL, NULL); + pProf->calcParams(vignette ? 0 : 1, focalLength, focusDist, aperture, &mc, nullptr, nullptr); mc.prepareParams(fullWidth, fullHeight, focalLength, focalLength35mm, pProf->sensorFormatFactor, swapXY, mirrorX, mirrorY); if (!vignette) { @@ -276,12 +276,12 @@ float LCPMapper::calcVignetteFac(int x, int y) const + 2.*aVig[0] * aVig[2] - 3.*param0Sqr * aVig[1]) * rsqr * rsqr)); } -LCPProfile::LCPProfile(Glib::ustring fname) +LCPProfile::LCPProfile(const Glib::ustring &fname) { const int BufferSize = 8192; char buf[BufferSize]; - XML_Parser parser = XML_ParserCreate(NULL); + XML_Parser parser = XML_ParserCreate(nullptr); if (!parser) { throw "Couldn't allocate memory for XML parser"; @@ -296,7 +296,7 @@ LCPProfile::LCPProfile(Glib::ustring fname) sensorFormatFactor = 1; for (int i = 0; i < MaxPersModelCount; i++) { - aPersModel[i] = NULL; + aPersModel[i] = nullptr; } persModelCount = 0; @@ -400,7 +400,7 @@ void LCPProfile::calcParams(int mode, float focalLength, float focusDist, float float euler = exp(1.0); // find the frames with the least distance, focal length wise - LCPPersModel *pLow = NULL, *pHigh = NULL; + LCPPersModel *pLow = nullptr, *pHigh = nullptr; float focalLengthLog = log(focalLength); //, apertureLog=aperture>0 ? log(aperture) : 0; float focusDistLog = focusDist > 0 ? log(focusDist) + euler : 0; @@ -410,11 +410,11 @@ void LCPProfile::calcParams(int mode, float focalLength, float focusDist, float float f = aPersModel[pm]->focLen; if (aPersModel[pm]->hasModeData(mode)) { - if (f <= focalLength && (pLow == NULL || f > pLow->focLen || (focusDist == 0 && f == pLow->focLen && pLow->focDist > aPersModel[pm]->focDist))) { + if (f <= focalLength && (pLow == nullptr || f > pLow->focLen || (focusDist == 0 && f == pLow->focLen && pLow->focDist > aPersModel[pm]->focDist))) { pLow = aPersModel[pm]; } - if (f >= focalLength && (pHigh == NULL || f < pHigh->focLen || (focusDist == 0 && f == pHigh->focLen && pHigh->focDist < aPersModel[pm]->focDist))) { + if (f >= focalLength && (pHigh == nullptr || f < pHigh->focLen || (focusDist == 0 && f == pHigh->focLen && pHigh->focDist < aPersModel[pm]->focDist))) { pHigh = aPersModel[pm]; } } @@ -488,7 +488,7 @@ void LCPProfile::calcParams(int mode, float focalLength, float focusDist, float } } - if (pLow != NULL && pHigh != NULL) { + if (pLow != nullptr && pHigh != nullptr) { // average out the factors, linear interpolation in logarithmic scale float facLow = 0.5; bool focLenOnSpot = false; // pretty often, since max/min are often as frames in LCP @@ -555,7 +555,7 @@ void XMLCALL LCPProfile::XmlStartHandler(void *pLCPProfile, const char *el, cons // clean up tagname const char* src = strrchr(el, ':'); - if (src == NULL) { + if (src == nullptr) { src = const_cast(el); } else { src++; @@ -621,11 +621,11 @@ void XMLCALL LCPProfile::XmlStartHandler(void *pLCPProfile, const char *el, cons // some profiles (espc. Pentax) have a different structure that is attributes based // simulate tags by feeding them in - if (parseAttr && attr != NULL) { + if (parseAttr && attr != nullptr) { for (int i = 0; attr[i]; i += 2) { const char* nameStart = strrchr(attr[i], ':'); - if (nameStart == NULL) { + if (nameStart == nullptr) { nameStart = const_cast(attr[i]); } else { nameStart++; @@ -772,7 +772,7 @@ void XMLCALL LCPProfile::XmlEndHandler(void *pLCPProfile, const char *el) pProf->inPerspect = false; } else if (strstr(el, ":li")) { pProf->aPersModel[pProf->persModelCount] = pProf->pCurPersModel; - pProf->pCurPersModel = NULL; + pProf->pCurPersModel = nullptr; pProf->persModelCount++; } } @@ -787,7 +787,7 @@ LCPStore* LCPStore::getInstance() LCPProfile* LCPStore::getProfile (Glib::ustring filename) { if (filename.length() == 0 || !isValidLCPFileName(filename)) { - return NULL; + return nullptr; } MyMutex::MyLock lock(mtx); diff --git a/rtengine/lcp.h b/rtengine/lcp.h index fa60a6013..908bacf56 100644 --- a/rtengine/lcp.h +++ b/rtengine/lcp.h @@ -89,7 +89,7 @@ public: static const int MaxPersModelCount = 3000; LCPPersModel* aPersModel[MaxPersModelCount]; // Do NOT use std::list or something, it's buggy in GCC! - LCPProfile(Glib::ustring fname); + explicit LCPProfile(const Glib::ustring &fname); void calcParams(int mode, float focalLength, float focusDist, float aperture, LCPModelCommon *pCorr1, LCPModelCommon *pCorr2, LCPModelCommon *pCorr3) const; // Interpolates between the persModels frames diff --git a/rtengine/loadinitial.cc b/rtengine/loadinitial.cc index cd4c4e8d6..c29d60621 100644 --- a/rtengine/loadinitial.cc +++ b/rtengine/loadinitial.cc @@ -36,7 +36,7 @@ InitialImage* InitialImage::load (const Glib::ustring& fname, bool isRaw, int* e isrc->setProgressListener (pl); - if(isRaw && pl == NULL) { + if(isRaw && pl == nullptr) { *errorCode = isrc->load (fname, true); } else { *errorCode = isrc->load (fname); @@ -44,7 +44,7 @@ InitialImage* InitialImage::load (const Glib::ustring& fname, bool isRaw, int* e if (*errorCode) { delete isrc; - return NULL; + return nullptr; } return isrc; diff --git a/rtengine/median.h b/rtengine/median.h index d7a6b37de..971452bc3 100644 --- a/rtengine/median.h +++ b/rtengine/median.h @@ -45,7 +45,7 @@ inline T median(std::array array) std::nth_element(array.begin(), middle, array.end()); return - N % 2 + (N % 2) ? *middle : ((*middle + *std::max_element(array.begin(), middle)) / static_cast(2)); } diff --git a/rtengine/myfile.cc b/rtengine/myfile.cc index 0414cc1de..11a5b495b 100644 --- a/rtengine/myfile.cc +++ b/rtengine/myfile.cc @@ -88,7 +88,7 @@ IMFILE* fopen (const char* fname) #endif if ( fd < 0 ) { - return 0; + return nullptr; } struct stat stat_buffer; @@ -96,15 +96,15 @@ IMFILE* fopen (const char* fname) if ( fstat(fd, &stat_buffer) < 0 ) { printf("no stat\n"); close (fd); - return 0; + return nullptr; } - void* data = mmap(0, stat_buffer.st_size, PROT_READ, MAP_PRIVATE, fd, 0); + void* data = mmap(nullptr, stat_buffer.st_size, PROT_READ, MAP_PRIVATE, fd, 0); if ( data == MAP_FAILED ) { printf("no mmap\n"); close(fd); - return 0; + return nullptr; } IMFILE* mf = new IMFILE; @@ -131,9 +131,9 @@ IMFILE* fopen (const char* fname) // initialize bzip stream structure bz_stream stream; - stream.bzalloc = 0; - stream.bzfree = 0; - stream.opaque = 0; + stream.bzalloc = nullptr; + stream.bzfree = nullptr; + stream.opaque = nullptr; ret = BZ2_bzDecompressInit(&stream, 0, 0); if (ret != BZ_OK) { @@ -142,7 +142,7 @@ IMFILE* fopen (const char* fname) // allocate initial buffer for decompressed data unsigned int buffer_out_count = 0; // bytes of decompressed data unsigned int buffer_size = 10 * 1024 * 1024; // 10 MB, extended dynamically if needed - char* buffer = 0; + char* buffer = nullptr; stream.next_in = mf->data; // input data address stream.avail_in = mf->size; @@ -361,7 +361,7 @@ int fscanf (IMFILE* f, const char* s ...) // of file data and vsscanf() won't tell us how many characters that // were parsed. However, only dcraw.cc code use it and only for "%f" and // "%d", so we make a dummy fscanf here just to support dcraw case. - char buf[50], *endptr; + char buf[50], *endptr = nullptr; int copy_sz = f->size - f->pos; if (copy_sz > sizeof(buf)) { @@ -377,6 +377,7 @@ int fscanf (IMFILE* f, const char* s ...) int i = strtol(buf, &endptr, 10); if (endptr == buf) { + va_end (ap); return 0; } @@ -386,6 +387,7 @@ int fscanf (IMFILE* f, const char* s ...) float f = strtof(buf, &endptr); if (endptr == buf) { + va_end (ap); return 0; } @@ -404,7 +406,7 @@ char* fgets (char* s, int n, IMFILE* f) if (f->pos >= f->size) { f->eof = true; - return NULL; + return nullptr; } int i = 0; diff --git a/rtengine/noncopyable.h b/rtengine/noncopyable.h new file mode 100644 index 000000000..d34c42441 --- /dev/null +++ b/rtengine/noncopyable.h @@ -0,0 +1,34 @@ +/* + * This file is part of RawTherapee. + * + * Copyright (c) 2016 Flössie + * + * 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 . + */ + +#pragma once + +namespace rtengine +{ + +class NonCopyable +{ +public: + NonCopyable() = default; + + explicit NonCopyable(const NonCopyable&) = delete; + NonCopyable& operator =(const NonCopyable&) = delete; +}; + +} diff --git a/rtengine/pipettebuffer.cc b/rtengine/pipettebuffer.cc index d76589e99..6f6d9dcef 100644 --- a/rtengine/pipettebuffer.cc +++ b/rtengine/pipettebuffer.cc @@ -23,7 +23,7 @@ namespace rtengine { PipetteBuffer::PipetteBuffer(::EditDataProvider *dataProvider) : - dataProvider(dataProvider), imgFloatBuffer(NULL), LabBuffer(NULL), singlePlaneBuffer(), ready(false) {} + dataProvider(dataProvider), imgFloatBuffer(nullptr), LabBuffer(nullptr), singlePlaneBuffer(), ready(false) {} PipetteBuffer::~PipetteBuffer() { @@ -46,12 +46,12 @@ void PipetteBuffer::flush() { if (imgFloatBuffer) { delete imgFloatBuffer; - imgFloatBuffer = NULL; + imgFloatBuffer = nullptr; } if (LabBuffer) { delete LabBuffer; - LabBuffer = NULL; + LabBuffer = nullptr; } singlePlaneBuffer.flushData(); @@ -69,7 +69,7 @@ EditUniqueID PipetteBuffer::getEditID() void PipetteBuffer::resize(int newWidth, int newHeight) { - resize(newWidth, newHeight, dataProvider ? dataProvider->getCurrSubscriber() : NULL); + resize(newWidth, newHeight, dataProvider ? dataProvider->getCurrSubscriber() : nullptr); } // Resize buffers if they already exist @@ -85,13 +85,13 @@ void PipetteBuffer::resize(int newWidth, int newHeight, EditSubscriber* newSubsc } } else if (imgFloatBuffer) { delete imgFloatBuffer; - imgFloatBuffer = NULL; + imgFloatBuffer = nullptr; } if (newSubscriber->getPipetteBufferType() == BT_LABIMAGE) { if (LabBuffer && (LabBuffer->W != newWidth && LabBuffer->H != newHeight)) { delete LabBuffer; - LabBuffer = NULL; + LabBuffer = nullptr; } if (!LabBuffer) { @@ -99,7 +99,7 @@ void PipetteBuffer::resize(int newWidth, int newHeight, EditSubscriber* newSubsc } } else if (LabBuffer) { delete LabBuffer; - LabBuffer = NULL; + LabBuffer = nullptr; } if (newSubscriber->getPipetteBufferType() == BT_SINGLEPLANE_FLOAT) { @@ -124,11 +124,11 @@ bool PipetteBuffer::bufferCreated() if (subscriber->getEditingType() == ET_PIPETTE) { switch (dataProvider->getCurrSubscriber()->getPipetteBufferType()) { case (BT_IMAGEFLOAT): - return imgFloatBuffer != NULL; + return imgFloatBuffer != nullptr; case (BT_LABIMAGE): - return LabBuffer != NULL; + return LabBuffer != nullptr; case (BT_SINGLEPLANE_FLOAT): - return singlePlaneBuffer.data != NULL; + return singlePlaneBuffer.data != nullptr; } } else { return false; @@ -159,7 +159,7 @@ void PipetteBuffer::getPipetteData(float* v, int x, int y, int squareSize) break; case (BT_SINGLEPLANE_FLOAT): - if (singlePlaneBuffer.data != NULL) { + if (singlePlaneBuffer.data != nullptr) { singlePlaneBuffer.getPipetteData(v[0], x, y, squareSize, 0); v[1] = v[2] = -1.f; return; diff --git a/rtengine/pipettebuffer.h b/rtengine/pipettebuffer.h index e6db8eb68..139438e1d 100644 --- a/rtengine/pipettebuffer.h +++ b/rtengine/pipettebuffer.h @@ -50,7 +50,7 @@ protected: void flush(); public: - PipetteBuffer(::EditDataProvider *dataProvider); + explicit PipetteBuffer(::EditDataProvider *dataProvider); ~PipetteBuffer(); /** @brief Getter to know if the pipette buffer is correctly filled */ diff --git a/rtengine/previewimage.cc b/rtengine/previewimage.cc index 16355a8c0..891186d8a 100644 --- a/rtengine/previewimage.cc +++ b/rtengine/previewimage.cc @@ -29,11 +29,11 @@ using namespace procparams; PreviewImage::PreviewImage (const Glib::ustring &fname, const Glib::ustring &ext, const PreviewImageMode mode) { - rtengine::Thumbnail* tpp = NULL; + rtengine::Thumbnail* tpp = nullptr; if (mode == PIM_EmbeddedPreviewOnly || mode == PIM_EmbeddedOrRaw) { - const unsigned char *data = NULL; + const unsigned char *data = nullptr; int width = -1, height = -1; @@ -107,8 +107,8 @@ PreviewImage::PreviewImage (const Glib::ustring &fname, const Glib::ustring &ext int error = rawImage.load(fname, true); if (!error) { - rtengine::Image8 *output = NULL; - const unsigned char *data = NULL; + rtengine::Image8 *output = nullptr; + const unsigned char *data = nullptr; int fw, fh; procparams::ProcParams params; diff --git a/rtengine/processingjob.h b/rtengine/processingjob.h index fbf56234f..2de426a31 100644 --- a/rtengine/processingjob.h +++ b/rtengine/processingjob.h @@ -34,10 +34,10 @@ public: procparams::ProcParams pparams; ProcessingJobImpl (const Glib::ustring& fn, bool iR, const procparams::ProcParams& pp) - : fname(fn), isRaw(iR), initialImage(NULL), pparams(pp) {} + : fname(fn), isRaw(iR), initialImage(nullptr), pparams(pp) {} ProcessingJobImpl (InitialImage* iImage, const procparams::ProcParams& pp) - : fname(""), initialImage(iImage), pparams(pp) + : fname(""), isRaw(true), initialImage(iImage), pparams(pp) { iImage->increaseRef(); } diff --git a/rtengine/procevents.h b/rtengine/procevents.h index eddb47b91..4e586449f 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -469,7 +469,8 @@ enum ProcEvent { EvcbdlMethod = 439, EvRetinexgaintransmission = 440, EvLskal = 441, - EvSpotEnabled = 442, + EvOBPCompens = 442, + EvSpotEnabled = 443, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 07a62df72..193619282 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -756,13 +756,13 @@ void WaveletParams::setDefaults() hhcurve.push_back(FCT_Linear); Chcurve.clear (); Chcurve.push_back(FCT_Linear); - expcontrast = true; - expchroma = true; - expedge = true; - expresid = true; - expfinal = true; - exptoning = true; - expnoise = true; + expcontrast = false; + expchroma = false; + expedge = false; + expresid = false; + expfinal = false; + exptoning = false; + expnoise = false; for(int i = 0; i < 9; i ++) { c[i] = 0; @@ -936,6 +936,7 @@ void ColorManagementParams::setDefaults() working = "ProPhoto"; output = "RT_sRGB"; outputIntent = RI_RELATIVE; + outputBPC = true; gamma = "default"; gampos = 2.22; slpos = 4.5; @@ -1484,6 +1485,10 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b //save retinex + if (!pedited || pedited->retinex.enabled) { + keyFile.set_boolean ("Retinex", "Enabled", retinex.enabled); + } + if (!pedited || pedited->retinex.str) { keyFile.set_integer ("Retinex", "Str", retinex.str); } @@ -1512,10 +1517,6 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_double ("Retinex", "Slope", retinex.slope); } - if (!pedited || pedited->retinex.enabled) { - keyFile.set_boolean ("Retinex", "Enabled", retinex.enabled); - } - if (!pedited || pedited->retinex.medianmap) { keyFile.set_boolean ("Retinex", "Median", retinex.medianmap); } @@ -2693,6 +2694,10 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_string ("Color Management", "OutputProfileIntent", intent); } + if (!pedited || pedited->icm.outputBPC) { + keyFile.set_boolean ("Color Management", "OutputBPC", icm.outputBPC); + } + if (!pedited || pedited->icm.gamma) { keyFile.set_string ("Color Management", "Gammafree", icm.gamma); } @@ -3462,7 +3467,7 @@ int ProcParams::write (const Glib::ustring &fname, const Glib::ustring &content) FILE *f; f = g_fopen (fname.c_str (), "wt"); - if (f == NULL) { + if (f == nullptr) { error = 1; } else { fprintf (f, "%s", content.c_str()); @@ -5982,6 +5987,14 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } + if (keyFile.has_key ("Color Management", "OutputBPC")) { + icm.outputBPC = keyFile.get_boolean ("Color Management", "OutputBPC"); + + if (pedited) { + pedited->icm.outputBPC = true; + } + } + if (keyFile.has_key ("Color Management", "Gammafree")) { icm.gamma = keyFile.get_string ("Color Management", "Gammafree"); @@ -7610,11 +7623,7 @@ bool operator==(const DirPyrEqualizerParams & a, const DirPyrEqualizerParams & b } } - if (a.threshold != b.threshold) { - return false; - } - - return true; + return a.threshold == b.threshold; } /*bool operator==(const ExifPairs& a, const ExifPairs& b) { @@ -8073,8 +8082,8 @@ PartialProfile::PartialProfile(bool createInstance, bool paramsEditedValue) pparams = new ProcParams(); pedited = new ParamsEdited(paramsEditedValue); } else { - pparams = NULL; - pedited = NULL; + pparams = nullptr; + pedited = nullptr; } } @@ -8098,13 +8107,13 @@ PartialProfile::PartialProfile(const ProcParams* pp, const ParamsEdited* pe) if (pp) { pparams = new ProcParams(*pp); } else { - pparams = NULL; + pparams = nullptr; } if (pe) { pedited = new ParamsEdited(*pe); } else { - pedited = NULL; + pedited = nullptr; } } @@ -8129,12 +8138,12 @@ void PartialProfile::deleteInstance () { if (pparams) { delete pparams; - pparams = NULL; + pparams = nullptr; } if (pedited) { delete pedited; - pedited = NULL; + pedited = nullptr; } } diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 1aa54ebee..e9e1ab8c8 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -19,11 +19,14 @@ #ifndef _PROCPARAMS_H_ #define _PROCPARAMS_H_ -#include #include #include #include +#include + +#include #include + #include "LUT.h" #include "coord.h" @@ -63,9 +66,7 @@ public: protected: bool initEq1; bool _isDouble; -#ifndef NDEBUG - unsigned int part[5]; -#endif + public: Threshold (T bottom, T top, bool startAtOne) { @@ -206,7 +207,7 @@ public: } }*/ - Threshold & operator= (const Threshold &rhs) + Threshold& operator =(const Threshold &rhs) { value[0] = rhs.value[0]; value[1] = rhs.value[1]; @@ -217,16 +218,34 @@ public: return *this; } - bool operator== (const Threshold &rhs) const + template + typename std::enable_if::value, bool>::type operator ==(const Threshold &rhs) const { - if (_isDouble) - return fabs(value[0] - rhs.value[0]) < 1e-10 - && fabs(value[1] - rhs.value[1]) < 1e-10 - && fabs(value[2] - rhs.value[2]) < 1e-10 - && fabs(value[3] - rhs.value[3]) < 1e-10; - else - return fabs(value[0] - rhs.value[0]) < 1e-10 - && fabs(value[1] - rhs.value[1]) < 1e-10; + if (_isDouble) { + return std::fabs(value[0] - rhs.value[0]) < 1e-10 + && std::fabs(value[1] - rhs.value[1]) < 1e-10 + && std::fabs(value[2] - rhs.value[2]) < 1e-10 + && std::fabs(value[3] - rhs.value[3]) < 1e-10; + } else { + return std::fabs(value[0] - rhs.value[0]) < 1e-10 + && std::fabs(value[1] - rhs.value[1]) < 1e-10; + } + } + + template + typename std::enable_if::value, bool>::type operator ==(const Threshold &rhs) const + { + if (_isDouble) { + return + value[0] == rhs.value[0] + && value[1] == rhs.value[1] + && value[2] == rhs.value[2] + && value[3] == rhs.value[3]; + } else { + return + value[0] == rhs.value[0] + && value[1] == rhs.value[1]; + } } }; @@ -1016,6 +1035,7 @@ public: Glib::ustring working; Glib::ustring output; RenderingIntent outputIntent; + bool outputBPC; static const Glib::ustring NoICMString; Glib::ustring gamma; @@ -1366,14 +1386,14 @@ public: * @param pedited pointer to a ParamsEdited object (optional) to store which values has to be saved * @return Error code (=0 if all supplied filenames where created correctly) */ - int save (const Glib::ustring &fname, const Glib::ustring &fname2 = "", bool fnameAbsolute = true, ParamsEdited* pedited = NULL); + int save (const Glib::ustring &fname, const Glib::ustring &fname2 = "", bool fnameAbsolute = true, ParamsEdited* pedited = nullptr); /** * Loads the parameters from a file. * @param fname the name of the file * @params pedited pointer to a ParamsEdited object (optional) to store which values has been loaded * @return Error code (=0 if no error) */ - int load (const Glib::ustring &fname, ParamsEdited* pedited = NULL); + int load (const Glib::ustring &fname, ParamsEdited* pedited = nullptr); /** Creates a new instance of ProcParams. * @return a pointer to the new ProcParams instance. */ @@ -1413,7 +1433,7 @@ class PartialProfile public: rtengine::procparams::ProcParams* pparams; ParamsEdited* pedited; - PartialProfile& operator=(PartialProfile& rhs) + PartialProfile& operator =(const PartialProfile& rhs) { pparams = rhs.pparams; pedited = rhs.pedited; @@ -1421,8 +1441,8 @@ public: }; PartialProfile (bool createInstance = false, bool paramsEditedValue = false); - PartialProfile (ProcParams* pp, ParamsEdited* pe = NULL, bool fullCopy = false); - PartialProfile (const ProcParams* pp, const ParamsEdited* pe = NULL); + PartialProfile (ProcParams* pp, ParamsEdited* pe = nullptr, bool fullCopy = false); + PartialProfile (const ProcParams* pp, const ParamsEdited* pe = nullptr); void deleteInstance (); void clearGeneral (); int load (const Glib::ustring &fName); diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc index 8f91f8f4b..1a8488c76 100644 --- a/rtengine/rawimage.cc +++ b/rtengine/rawimage.cc @@ -20,11 +20,12 @@ namespace rtengine extern const Settings* settings; RawImage::RawImage( const Glib::ustring &name ) - : data(NULL) + : data(nullptr) , prefilters(0) , filename(name) - , profile_data(NULL) - , allocation(NULL) + , profile_data(nullptr) + , allocation(nullptr) + , rotate_deg(0) { memset(maximum_c4, 0, sizeof(maximum_c4)); RT_matrix_from_constant = 0; @@ -44,22 +45,22 @@ RawImage::~RawImage() if(allocation) { delete [] allocation; - allocation = NULL; + allocation = nullptr; } if(float_raw_image) { delete [] float_raw_image; - float_raw_image = NULL; + float_raw_image = nullptr; } if(data) { delete [] data; - data = NULL; + data = nullptr; } if(profile_data) { delete [] profile_data; - profile_data = NULL; + profile_data = nullptr; } } @@ -400,9 +401,9 @@ skip_block: int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistener, double progressRange) { ifname = filename.c_str(); - image = NULL; + image = nullptr; verbose = settings->verbose; - oprof = NULL; + oprof = nullptr; ifp = gfopen (ifname); // Maps to either file map or direct fopen @@ -414,18 +415,18 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene thumb_length = 0; thumb_offset = 0; - thumb_load_raw = 0; + thumb_load_raw = nullptr; use_camera_wb = 0; highlight = 1; half_size = 0; - raw_image = 0; + raw_image = nullptr; //***************** Read ALL raw file info identify (); if (!is_raw) { fclose(ifp); - ifp = NULL; + ifp = nullptr; if (plistener) { plistener->setProgress(1.0 * progressRange); @@ -531,9 +532,9 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene crop_masked_pixels(); free (raw_image); - raw_image = NULL; + raw_image = nullptr; } else { - if (cc && cc->has_rawCrop()) { // foveon images + if (is_foveon && cc && cc->has_rawCrop()) { // foveon images int lm, tm, w, h; cc->get_rawCrop(lm, tm, w, h); left_margin = lm; @@ -643,7 +644,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene if ( closeFile ) { fclose(ifp); - ifp = NULL; + ifp = nullptr; } if (plistener) { @@ -656,7 +657,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene float** RawImage::compress_image() { if( !image ) { - return NULL; + return nullptr; } if (isBayer() || isXtrans()) { @@ -699,7 +700,7 @@ float** RawImage::compress_image() } delete [] float_raw_image; - float_raw_image = NULL; + float_raw_image = nullptr; } else if (filters != 0 && !isXtrans()) { #pragma omp parallel for @@ -733,7 +734,7 @@ float** RawImage::compress_image() } free(image); // we don't need this anymore - image = NULL; + image = nullptr; return data; } @@ -782,7 +783,7 @@ void RawImage::getRgbCam (float rgbcam[3][4]) bool RawImage::get_thumbSwap() const { - return ((order == 0x4949) == (ntohs(0x1234) == 0x1234)) ? true : false; + return (order == 0x4949) == (ntohs(0x1234) == 0x1234); } } //namespace rtengine diff --git a/rtengine/rawimage.h b/rtengine/rawimage.h index 86965a612..b741a7ffc 100644 --- a/rtengine/rawimage.h +++ b/rtengine/rawimage.h @@ -20,8 +20,10 @@ #define __RAWIMAGE_H #include + #include "dcraw.h" #include "imageio.h" +#include "noncopyable.h" namespace rtengine { @@ -32,7 +34,8 @@ struct badPix { badPix( uint16_t xc, uint16_t yc ): x(xc), y(yc) {} }; -class PixelsMap +class PixelsMap : + public NonCopyable { int w; // line width in base_t units int h; // height @@ -48,6 +51,7 @@ public: pm = new base_t [h * w ]; memset(pm, 0, h * w * base_t_size ); } + ~PixelsMap() { delete [] pm; @@ -99,10 +103,10 @@ class RawImage: public DCraw { public: - RawImage( const Glib::ustring &name ); + explicit RawImage( const Glib::ustring &name ); ~RawImage(); - int loadRaw (bool loadData = true, bool closeFile = true, ProgressListener *plistener = 0, double progressRange = 1.0); + int loadRaw (bool loadData = true, bool closeFile = true, ProgressListener *plistener = nullptr, double progressRange = 1.0); void get_colorsCoeff( float* pre_mul_, float* scale_mul_, float* cblack_, bool forceAutoWB ); void set_prefilters() { @@ -270,37 +274,37 @@ public: { return profile_data; } - IMFILE *get_file() + IMFILE *get_file() const { return ifp; } bool is_supportedThumb() const ; bool is_jpegThumb() const ; bool is_ppmThumb() const ; - int get_thumbOffset() + int get_thumbOffset() const { return int(thumb_offset); } - int get_thumbWidth() + int get_thumbWidth() const { return int(thumb_width); } - int get_thumbHeight() + int get_thumbHeight() const { return int(thumb_height); } - int get_thumbBPS() + int get_thumbBPS() const { return thumb_load_raw ? 16 : 8; } bool get_thumbSwap() const; - unsigned get_thumbLength() + unsigned get_thumbLength() const { return thumb_length; } - bool zeroIsBad() + bool zeroIsBad() const { - return zero_is_bad == 1 ? true : false; + return zero_is_bad == 1; } public: diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index d2bdf9763..049c509f5 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -423,25 +423,49 @@ extern const Settings* settings; RawImageSource::RawImageSource () : ImageSource() - , plistener(NULL) + , W(0), H(0) + , plistener(nullptr) , border(4) - , ri(NULL) - , cache(NULL) + , ri(nullptr) + , cache(nullptr) , rawData(0, 0) , green(0, 0) , red(0, 0) , blue(0, 0) + , lc00(0.0) + , lc01(0.0) + , lc02(0.0) + , lc10(0.0) + , lc11(0.0) + , lc12(0.0) + , lc20(0.0) + , lc21(0.0) + , lc22(0.0) + , hlmax{} + , clmax{} + , chmax{} + , scale_mul{} + , c_black{} + , c_white{} + , cblacksom{} + , ref_pre_mul{} + , refwb_red(0.0) + , refwb_green(0.0) + , refwb_blue(0.0) + , rgb_cam{} + , cam_rgb{} + , xyz_cam{} + , cam_xyz{} + , fuji(false) + , d1x(false) + , initialGain(0.0) + , camInitialGain(0.0) + , defGain(0.0) + , threshold(0) { - hrmap[0] = NULL; - hrmap[1] = NULL; - hrmap[2] = NULL; - //needhr = NULL; - //hpmap = NULL; - camProfile = NULL; - embProfile = NULL; + camProfile = nullptr; + embProfile = nullptr; rgbSourceModified = false; - hlmax[0] = hlmax[1] = hlmax[2] = hlmax[3] = 0.f; - clmax[0] = clmax[1] = clmax[2] = clmax[3] = 0.f; } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -462,13 +486,6 @@ RawImageSource::~RawImageSource () delete [] cache; } - if (hrmap[0] != NULL) { - int dh = H / HR_SCALE; - freeJaggedArray(hrmap[0]); - freeJaggedArray(hrmap[1]); - freeJaggedArray(hrmap[2]); - } - if (camProfile) { cmsCloseProfile (camProfile); } @@ -872,12 +889,12 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, ColorTemp &wb, DCPProfile::ApplyState &as) { - DCPProfile *dcpProf = NULL; + DCPProfile *dcpProf = nullptr; cmsHPROFILE dummy; - findInputProfile(cmp.input, NULL, (static_cast(getMetaData()))->getCamera(), &dcpProf, dummy); + findInputProfile(cmp.input, nullptr, (static_cast(getMetaData()))->getCamera(), &dcpProf, dummy); - if (dcpProf == NULL) { - return NULL; + if (dcpProf == nullptr) { + return nullptr; } dcpProf->setStep2ApplyState(cmp.working, cmp.toneCurve, cmp.applyLookTable, cmp.applyBaselineExposureOffset, as); @@ -1453,10 +1470,9 @@ void RawImageSource::getFullSize (int& w, int& h, int tr) //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -void RawImageSource::getSize (int tran, PreviewProps pp, int& w, int& h) +void RawImageSource::getSize (PreviewProps pp, int& w, int& h) { - tran = defTransform (tran); w = pp.w / pp.skip + (pp.w % pp.skip > 0); h = pp.h / pp.skip + (pp.h % pp.skip > 0); } @@ -1629,7 +1645,7 @@ int RawImageSource::load (const Glib::ustring &fname, bool batch) plistener->setProgress (1.0); } - plistener = NULL; // This must be reset, because only load() is called through progressConnector + plistener = nullptr; // This must be reset, because only load() is called through progressConnector t2.set(); if( settings->verbose ) { @@ -1648,7 +1664,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le t1.set(); Glib::ustring newDF = raw.dark_frame; - RawImage *rid = NULL; + RawImage *rid = nullptr; if (!raw.df_autoselect) { if( !raw.dark_frame.empty()) { @@ -1686,7 +1702,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } //FLATFIELD start - RawImage *rif = NULL; + RawImage *rif = nullptr; if (!raw.ff_AutoSelect) { if( !raw.ff_file.empty()) { @@ -1697,7 +1713,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } - bool hasFlatField = (rif != NULL); + bool hasFlatField = (rif != nullptr); if( hasFlatField && settings->verbose) { printf( "Flat Field Correction:%s\n", rif->get_filename().c_str()); @@ -1723,7 +1739,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } // If darkframe selected, correct hotpixels found on darkframe - bp = 0; + bp = nullptr; if( raw.df_autoselect ) { bp = dfm.getHotPixels(idata->getMake(), idata->getModel(), idata->getISOSpeed(), idata->getShutterSpeed(), idata->getDateTimeAsTS()); @@ -1835,7 +1851,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } - if( totBP ) + if( totBP ) { if ( ri->getSensorType() == ST_BAYER ) { interpolateBadPixelsBayer( *bitmapBads ); } else if ( ri->getSensorType() == ST_FUJI_XTRANS ) { @@ -1843,6 +1859,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } else { interpolateBadPixelsNColours( *bitmapBads, ri->get_colors() ); } + } if ( ri->getSensorType() == ST_BAYER && raw.bayersensor.linenoise > 0 ) { if (plistener) { @@ -1973,7 +1990,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar } else if(retinexParams.gammaretinex == "hig") { retinexgamtab = &(Color::gammatab_145_3); } else if(retinexParams.gammaretinex == "fre") { - double g_a0, g_a1, g_a2, g_a3, g_a4, g_a5; + GammaValues g_a; double pwr = 1.0 / retinexParams.gam; double gamm = retinexParams.gam; double ts = retinexParams.slope; @@ -1984,21 +2001,21 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar } int mode = 0, imax = 0; - Color::calcGamma(pwr, ts, mode, imax, g_a0, g_a1, g_a2, g_a3, g_a4, g_a5); // call to calcGamma with selected gamma and slope + Color::calcGamma(pwr, ts, mode, imax, g_a); // call to calcGamma with selected gamma and slope // printf("g_a0=%f g_a1=%f g_a2=%f g_a3=%f g_a4=%f\n", g_a0,g_a1,g_a2,g_a3,g_a4); double start; double add; if(gamm2 < 1.) { - start = g_a2; - add = g_a4; + start = g_a[2]; + add = g_a[4]; } else { - start = g_a3; - add = g_a4; + start = g_a[3]; + add = g_a[4]; } - double mul = 1. + g_a4; + double mul = 1. + g_a[4]; lutTonereti(65536); @@ -2123,7 +2140,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar #endif for (; j < W - border; j++) { - float H, S, L; + float L; //rgb=>lab Color::rgb2hslfloat(red[i][j], green[i][j], blue[i][j], conversionBuffer[0][i - border][j - border], conversionBuffer[1][i - border][j - border], L); L *= 32768.f; @@ -2245,7 +2262,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC } else if(deh.gammaretinex == "hig") { retinexigamtab = &(Color::igammatab_145_3); } else if(deh.gammaretinex == "fre") { - double g_a0, g_a1, g_a2, g_a3, g_a4, g_a5; + GammaValues g_a; double pwr = 1.0 / deh.gam; double gamm = deh.gam; double gamm2 = gamm; @@ -2256,18 +2273,18 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC std::swap(pwr, gamm); } - Color::calcGamma(pwr, ts, mode, imax, g_a0, g_a1, g_a2, g_a3, g_a4, g_a5); // call to calcGamma with selected gamma and slope + Color::calcGamma(pwr, ts, mode, imax, g_a); // call to calcGamma with selected gamma and slope - double mul = 1. + g_a4; + double mul = 1. + g_a[4]; double add; double start; if(gamm2 < 1.) { - start = g_a3; - add = g_a3; + start = g_a[3]; + add = g_a[3]; } else { - add = g_a4; - start = g_a2; + add = g_a[4]; + start = g_a[2]; } // printf("g_a0=%f g_a1=%f g_a2=%f g_a3=%f g_a4=%f\n", g_a0,g_a1,g_a2,g_a3,g_a4); @@ -2296,7 +2313,6 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC float **temp = conversionBuffer[2]; // one less dereference LUTf dLcurve; LUTu hist16RET; - float val; if(dehacontlutili && histLRETI) { hist16RET(32768); @@ -2305,7 +2321,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC dLcurve(32768); } - FlatCurve* chcurve = NULL;//curve c=f(H) + FlatCurve* chcurve = nullptr;//curve c=f(H) bool chutili = false; if (deh.enabled && deh.retinexMethod == "highli") { @@ -2314,7 +2330,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC if (!chcurve || chcurve->isIdentity()) { if (chcurve) { delete chcurve; - chcurve = NULL; + chcurve = nullptr; } } else { chutili = true; @@ -2369,7 +2385,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC // hist16RET.compressTo(histLRETI); // also remove declaration and init of dLcurve some lines above then and finally remove this comment :) for (int i = 0; i < 32768; i++) { - val = (double)i / 32767.0; + float val = (double)i / 32767.0; dLcurve[i] = val; } @@ -2393,14 +2409,8 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC for (; j < W - border; j++) { - float valp; - // if(chutili) { // c=f(H) - { - valp = float((chcurve->getVal(conversionBuffer[3][i - border][j - border]) - 0.5f)); - - conversionBuffer[1][i - border][j - border] *= (1.f + 2.f * valp); - } - // } + float valp = (chcurve->getVal(conversionBuffer[3][i - border][j - border]) - 0.5f); + conversionBuffer[1][i - border][j - border] *= (1.f + 2.f * valp); } } @@ -2629,7 +2639,7 @@ void RawImageSource::flushRawData() { if(cache) { delete [] cache; - cache = 0; + cache = nullptr; } if (rawData) { @@ -2822,7 +2832,7 @@ void RawImageSource::processFlatField(const RAWParams &raw, RawImage *riFlatFile if(raw.ff_AutoClipControl) { // determine maximum calculated value to avoid clipping - int clipControlGui = 0; +// int clipControlGui = 0; float maxval = 0.f; // xtrans files have only one black level actually, so we can simplify the code a bit #ifdef _OPENMP @@ -2857,7 +2867,7 @@ void RawImageSource::processFlatField(const RAWParams &raw, RawImage *riFlatFile // there's only one white level for xtrans if(maxval + black[0] > ri->get_white(0)) { limitFactor = ri->get_white(0) / (maxval + black[0]); - clipControlGui = (1.f - limitFactor) * 100.f; // this value can be used to set the clip control slider in gui +// clipControlGui = (1.f - limitFactor) * 100.f; // this value can be used to set the clip control slider in gui } } else { limitFactor = max((float)(100 - raw.ff_clipControl) / 100.f, 0.01f); @@ -3696,9 +3706,9 @@ void RawImageSource::getProfilePreprocParams(cmsHPROFILE in, float& gammaFac, fl copyright[0] = 0; if (cmsGetProfileInfoASCII(in, cmsInfoCopyright, cmsNoLanguage, cmsNoCountry, copyright, 256) > 0) { - if (strstr(copyright, "Phase One") != NULL) { + if (strstr(copyright, "Phase One") != nullptr) { gammaFac = 0.55556; // 1.8 - } else if (strstr(copyright, "Nikon Corporation") != NULL) { + } else if (strstr(copyright, "Nikon Corporation") != nullptr) { gammaFac = 0.5; lineFac = -0.4; lineSum = 1.35; // determined in reverse by measuring NX an RT developed colorchecker PNGs @@ -3767,7 +3777,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam return; } - if (dcpProf != NULL) { + if (dcpProf != nullptr) { // DCP processing const DCPProfile::Triple pre_mul_row = { pre_mul[0], @@ -3784,7 +3794,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam return; } - if (in == NULL) { + if (in == nullptr) { // use default camprofile, supplied by dcraw // in this case we avoid using the slllllooooooowwww lcms @@ -3860,10 +3870,10 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam camera_icc_type = CAMERA_ICC_TYPE_GENERIC; // Note: order the identification with the most detailed matching first since the more general ones may also match the more detailed - if ((strstr(copyright, "Leaf") != NULL || - strstr(copyright, "Phase One A/S") != NULL || - strstr(copyright, "Kodak") != NULL || - strstr(copyright, "Creo") != NULL) && + if ((strstr(copyright, "Leaf") != nullptr || + strstr(copyright, "Phase One A/S") != nullptr || + strstr(copyright, "Kodak") != nullptr || + strstr(copyright, "Creo") != nullptr) && (strstr(description, "LF2 ") == description || strstr(description, "LF3 ") == description || strstr(description, "LeafLF2") == description || @@ -3872,9 +3882,9 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam strstr(description, "MamiyaLF2") == description || strstr(description, "MamiyaLF3") == description)) { camera_icc_type = CAMERA_ICC_TYPE_LEAF; - } else if (strstr(copyright, "Phase One A/S") != NULL) { + } else if (strstr(copyright, "Phase One A/S") != nullptr) { camera_icc_type = CAMERA_ICC_TYPE_PHASE_ONE; - } else if (strstr(copyright, "Nikon Corporation") != NULL) { + } else if (strstr(copyright, "Nikon Corporation") != nullptr) { camera_icc_type = CAMERA_ICC_TYPE_NIKON; } } @@ -3893,7 +3903,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam transform_via_pcs_lab = true; separate_pcs_lab_highlights = true; // We transform to Lab because we can and that we avoid getting an unnecessary unmatched gamma conversion which we would need to revert. - hTransform = cmsCreateTransform (in, TYPE_RGB_FLT, NULL, TYPE_Lab_FLT, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); + hTransform = cmsCreateTransform (in, TYPE_RGB_FLT, nullptr, TYPE_Lab_FLT, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { @@ -3917,14 +3927,14 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam lcmsMutex->unlock (); - if (hTransform == NULL) { + if (hTransform == nullptr) { // Fallback: create transform from camera profile. Should not happen normally. lcmsMutex->lock (); hTransform = cmsCreateTransform (camprofile, TYPE_RGB_FLT, prophoto, TYPE_RGB_FLT, INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE ); lcmsMutex->unlock (); } - TMatrix toxyz, torgb; + TMatrix toxyz = {}, torgb = {}; if (!working_space_is_prophoto) { toxyz = iccStore->workingSpaceMatrix ("ProPhoto"); @@ -4127,8 +4137,8 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam // Determine RAW input and output profiles. Returns TRUE on success bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embedded, std::string camName, DCPProfile **dcpProf, cmsHPROFILE& in) { - in = NULL; // cam will be taken on NULL - *dcpProf = NULL; + in = nullptr; // cam will be taken on NULL + *dcpProf = nullptr; if (inProfile == "(none)") { return false; @@ -4140,7 +4150,7 @@ bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embed // DCPs have higher quality, so use them first *dcpProf = DCPStore::getInstance()->getStdProfile(camName); - if (*dcpProf == NULL) { + if (*dcpProf == nullptr) { in = iccStore->getStdProfile(camName); } } else if (inProfile != "(camera)" && inProfile != "") { @@ -4154,7 +4164,7 @@ bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embed *dcpProf = DCPStore::getInstance()->getProfile(normalName); } - if (*dcpProf == NULL) { + if (*dcpProf == nullptr) { in = iccStore->getProfile (inProfile); } } @@ -4202,7 +4212,7 @@ void RawImageSource::HLRecovery_blend(float* rin, float* gin, float* bin, int wi for (int col = 0; col < width; col++) { float rgb[ColorCount], cam[2][ColorCount], lab[2][ColorCount], sum[2], chratio, lratio = 0; - float L, C, H, Lfrac; + float L, C, H; // Copy input pixel to rgb so it's easier to access in loops rgb[0] = rin[col]; @@ -4290,7 +4300,7 @@ void RawImageSource::HLRecovery_blend(float* rin, float* gin, float* bin, int wi bin[col] = L + H / 3.0; if ((L = (rin[col] + gin[col] + bin[col]) / 3) > desatpt) { - Lfrac = max(0.0f, (maxave - L) / (maxave - desatpt)); + float Lfrac = max(0.0f, (maxave - L) / (maxave - desatpt)); C = Lfrac * 1.732050808 * (rin[col] - gin[col]); H = Lfrac * (2 * bin[col] - rin[col] - gin[col]); rin[col] = L - H / 6.0 + C / 3.464101615; @@ -4395,7 +4405,7 @@ void RawImageSource::HLRecovery_CIELab (float* rin, float* gin, float* bin, floa //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -void RawImageSource::hlRecovery (std::string method, float* red, float* green, float* blue, int width, float* hlmax ) +void RawImageSource::hlRecovery (const std::string &method, float* red, float* green, float* blue, int width, float* hlmax ) { if (method == "Luminance") { @@ -4403,8 +4413,6 @@ void RawImageSource::hlRecovery (std::string method, float* red, float* green, f } else if (method == "CIELab blending") { HLRecovery_CIELab (red, green, blue, red, green, blue, width, 65535.0, imatrices.xyz_cam, imatrices.cam_xyz); } - /*else if (method=="Color") - HLRecovery_ColorPropagation (red, green, blue, i, sx1, width, skip);*/ else if (method == "Blend") { // derived from Dcraw HLRecovery_blend(red, green, blue, width, 65535.0, hlmax); } @@ -4889,11 +4897,11 @@ ColorTemp RawImageSource::getSpotWB (std::vector &red, std::vectorgetSensorType() != ST_BAYER) { if(ri->getSensorType() == ST_FUJI_XTRANS) { int d[9][2] = {{0, 0}, { -1, -1}, { -1, 0}, { -1, 1}, {0, -1}, {0, 1}, {1, -1}, {1, 0}, {1, 1}}; - double rloc, gloc, bloc; - int rnbrs, gnbrs, bnbrs; for (size_t i = 0; i < red.size(); i++) { transformPosition (red[i].x, red[i].y, tran, x, y); + double rloc, gloc, bloc; + int rnbrs, gnbrs, bnbrs; rloc = gloc = bloc = rnbrs = gnbrs = bnbrs = 0; for (int k = 0; k < 9; k++) { @@ -4961,11 +4969,11 @@ ColorTemp RawImageSource::getSpotWB (std::vector &red, std::vector &rbconv_Y, array2D &rbconv_I, array2D &rbconv_Q, array2D &rbout_I, array2D &rbout_Q, const int row_from, const int row_to); - void hlRecovery (std::string method, float* red, float* green, float* blue, int width, float* hlmax); + void hlRecovery (const std::string &method, float* red, float* green, float* blue, int width, float* hlmax); void transformRect (PreviewProps pp, int tran, int &sx1, int &sy1, int &width, int &height, int &fw); void transformPosition (int x, int y, int tran, int& tx, int& ty); - void updateHLRecoveryMap_ColorPropagation (); - void HLRecovery_ColorPropagation (float* red, float* green, float* blue, int i, int sx1, int width, int skip); unsigned FC(int row, int col) { return ri->FC(row, col); @@ -140,7 +132,7 @@ public: void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const ColorManagementParams &cmp, const RAWParams &raw); eSensorType getSensorType () const { - return ri != NULL ? ri->getSensorType() : ST_NONE; + return ri != nullptr ? ri->getSensorType() : ST_NONE; } ColorTemp getWB () const { @@ -159,7 +151,7 @@ public: } void getFullSize (int& w, int& h, int tr = TR_NONE); - void getSize (int tran, PreviewProps pp, int& w, int& h); + void getSize (PreviewProps pp, int& w, int& h); int getRotateDegree() const { return ri->get_rotateDegree(); @@ -188,7 +180,7 @@ public: void convertColorSpace(Imagefloat* image, const ColorManagementParams &cmp, const ColorTemp &wb); static bool findInputProfile(Glib::ustring inProfile, cmsHPROFILE embedded, std::string camName, DCPProfile **dcpProf, cmsHPROFILE& in); - static void colorSpaceConversion (Imagefloat* im, ColorManagementParams cmp, const ColorTemp &wb, double pre_mul[3], cmsHPROFILE embedded, cmsHPROFILE camprofile, double cam[3][3], std::string camName) + static void colorSpaceConversion (Imagefloat* im, ColorManagementParams cmp, const ColorTemp &wb, double pre_mul[3], cmsHPROFILE embedded, cmsHPROFILE camprofile, double cam[3][3], const std::string &camName) { colorSpaceConversion_ (im, cmp, wb, pre_mul, embedded, camprofile, cam, camName); } diff --git a/rtengine/rawimagesource_i.h b/rtengine/rawimagesource_i.h index f5685b0ef..1cd25d6fc 100644 --- a/rtengine/rawimagesource_i.h +++ b/rtengine/rawimagesource_i.h @@ -140,7 +140,21 @@ inline void RawImageSource::interpolate_row_g (float* agh, float* agv, int i) inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg, float* cg, float* ng, int i) { - if (ri->ISRED(i, 0) || ri->ISRED(i, 1)) { + const auto getPg = [pg](int index) { + return + pg + ? pg[index] + : 0.f; + }; + + const auto getNg = [ng](int index) { + return + ng + ? ng[index] + : 0.f; + }; + + if ((ri->ISRED(i, 0) || ri->ISRED(i, 1))) { // RGRGR or GRGRGR line for (int j = 0; j < W; j++) { if (ri->ISRED(i, j)) { @@ -151,22 +165,22 @@ inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg, int n = 0; if (i > 0 && j > 0) { - b += rawData[i - 1][j - 1] - pg[j - 1]; + b += rawData[i - 1][j - 1] - getPg(j - 1); n++; } if (i > 0 && j < W - 1) { - b += rawData[i - 1][j + 1] - pg[j + 1]; + b += rawData[i - 1][j + 1] - getPg(j + 1); n++; } if (i < H - 1 && j > 0) { - b += rawData[i + 1][j - 1] - ng[j - 1]; + b += rawData[i + 1][j - 1] - getNg(j - 1); n++; } if (i < H - 1 && j < W - 1) { - b += rawData[i + 1][j + 1] - ng[j + 1]; + b += rawData[i + 1][j + 1] - getNg(j + 1); n++; } @@ -189,11 +203,11 @@ inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg, int b; if (i == 0) { - b = ng[j] + rawData[1][j] - cg[j]; + b = getNg(j) + rawData[1][j] - cg[j]; } else if (i == H - 1) { - b = pg[j] + rawData[H - 2][j] - cg[j]; + b = getPg(j) + rawData[H - 2][j] - cg[j]; } else { - b = cg[j] + (rawData[i - 1][j] - pg[j] + rawData[i + 1][j] - ng[j]) / 2; + b = cg[j] + (rawData[i - 1][j] - getPg(j) + rawData[i + 1][j] - getNg(j)) / 2; } ab[j] = b; @@ -210,22 +224,22 @@ inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg, int n = 0; if (i > 0 && j > 0) { - r += rawData[i - 1][j - 1] - pg[j - 1]; + r += rawData[i - 1][j - 1] - getPg(j - 1); n++; } if (i > 0 && j < W - 1) { - r += rawData[i - 1][j + 1] - pg[j + 1]; + r += rawData[i - 1][j + 1] - getPg(j + 1); n++; } if (i < H - 1 && j > 0) { - r += rawData[i + 1][j - 1] - ng[j - 1]; + r += rawData[i + 1][j - 1] - getNg(j - 1); n++; } if (i < H - 1 && j < W - 1) { - r += rawData[i + 1][j + 1] - ng[j + 1]; + r += rawData[i + 1][j + 1] - getNg(j + 1); n++; } @@ -249,11 +263,11 @@ inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg, int r; if (i == 0) { - r = ng[j] + rawData[1][j] - cg[j]; + r = getNg(j) + rawData[1][j] - cg[j]; } else if (i == H - 1) { - r = pg[j] + rawData[H - 2][j] - cg[j]; + r = getPg(j) + rawData[H - 2][j] - cg[j]; } else { - r = cg[j] + (rawData[i - 1][j] - pg[j] + rawData[i + 1][j] - ng[j]) / 2; + r = cg[j] + (rawData[i - 1][j] - getPg(j) + rawData[i + 1][j] - getNg(j)) / 2; } ar[j] = r; @@ -265,7 +279,7 @@ inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg, inline void RawImageSource::interpolate_row_rb_mul_pp (float* ar, float* ab, float* pg, float* cg, float* ng, int i, float r_mul, float g_mul, float b_mul, int x1, int width, int skip) { - if (ri->ISRED(i, 0) || ri->ISRED(i, 1)) { + if ((ri->ISRED(i, 0) || ri->ISRED(i, 1)) && pg && ng) { // RGRGR or GRGRGR line for (int j = x1, jx = 0; jx < width; j += skip, jx++) { if (ri->ISRED(i, j)) { @@ -324,7 +338,7 @@ inline void RawImageSource::interpolate_row_rb_mul_pp (float* ar, float* ab, flo ab[jx] = b; } } - } else { + } else if(pg && ng) { // BGBGB or GBGBGB line for (int j = x1, jx = 0; jx < width; j += skip, jx++) { if (ri->ISBLUE(i, j)) { diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 7fb198816..8ece130ff 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -453,7 +453,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = { RETINEX, // EvLhighl DEMOSAIC, // EvLbaselog DEMOSAIC, // EvRetinexlhcurve - ALLNORAW, // EvOIntent + OUTPUTPROFILE, // EvOIntent MONITORTRANSFORM, // EvMonitorTransform: no history message RETINEX, // EvLiter RETINEX, // EvLgrad @@ -469,6 +469,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = { ALLNORAW, // EvcbdlMethod RETINEX, // EvRetinexgaintransmission RETINEX, // EvLskal + OUTPUTPROFILE, // EvOBPCompens SPOT // EvSpotEnabled }; diff --git a/rtengine/refreshmap.h b/rtengine/refreshmap.h index adb8cbc27..8fd195e4e 100644 --- a/rtengine/refreshmap.h +++ b/rtengine/refreshmap.h @@ -47,7 +47,7 @@ // Bitfield of functions to do to the preview image when an event occurs // Use those or create new ones for your new events -#define FIRST (M_PREPROC|M_RAW|M_INIT|M_LINDENOISE|M_TRANSFORM|M_BLURMAP|M_AUTOEXP|M_SPOT|M_RGBCURVE|M_LUMACURVE|M_LUMINANCE|M_COLOR) // without HIGHQUAL +#define FIRST (M_PREPROC|M_RAW|M_INIT|M_LINDENOISE|M_TRANSFORM|M_BLURMAP|M_AUTOEXP|M_SPOT|M_RGBCURVE|M_LUMACURVE|M_LUMINANCE|M_COLOR|M_MONITOR) // without HIGHQUAL #define ALL (M_PREPROC|M_RAW|M_INIT|M_LINDENOISE|M_TRANSFORM|M_BLURMAP|M_AUTOEXP|M_SPOT|M_RGBCURVE|M_LUMACURVE|M_LUMINANCE|M_COLOR) // without HIGHQUAL #define DARKFRAME (M_PREPROC|M_RAW|M_INIT|M_LINDENOISE|M_TRANSFORM|M_BLURMAP|M_AUTOEXP|M_SPOT|M_RGBCURVE|M_LUMACURVE|M_LUMINANCE|M_COLOR) #define FLATFIELD (M_PREPROC|M_RAW|M_INIT|M_LINDENOISE|M_TRANSFORM|M_BLURMAP|M_AUTOEXP|M_SPOT|M_RGBCURVE|M_LUMACURVE|M_LUMINANCE|M_COLOR) @@ -63,7 +63,7 @@ #define DEFRINGE (M_LUMINANCE|M_COLOR) #define DIRPYRDENOISE (M_LUMINANCE|M_COLOR) #define DIRPYREQUALIZER (M_LUMINANCE|M_COLOR) -#define GAMMA (M_LUMINANCE|M_COLOR) +#define GAMMA M_MONITOR #define CROP M_CROP #define RESIZE M_VOID #define EXIF M_VOID @@ -71,7 +71,7 @@ #define MINUPDATE M_MINUPDATE #define RETINEX (M_RETINEX|ALLNORAW) #define MONITORTRANSFORM M_MONITOR -#define OUTPUTPROFILE (ALLNORAW|MONITORTRANSFORM) +#define OUTPUTPROFILE M_MONITOR extern int refreshmap[]; #endif diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h index 42e06406e..61c779fb7 100644 --- a/rtengine/rtengine.h +++ b/rtengine/rtengine.h @@ -176,7 +176,7 @@ public: * @param errorCode is a pointer to a variable that is set to nonzero if an error happened (output) * @param pl is a pointer pointing to an object implementing a progress listener. It can be NULL, in this case progress is not reported. * @return an object representing the loaded and pre-processed image */ - static InitialImage* load (const Glib::ustring& fname, bool isRaw, int* errorCode, ProgressListener* pl = NULL); + static InitialImage* load (const Glib::ustring& fname, bool isRaw, int* errorCode, ProgressListener* pl = nullptr); }; /** When the preview image is ready for display during staged processing (thus the changes have been updated), @@ -418,6 +418,8 @@ public: virtual void setMonitorProfile (const Glib::ustring& monitorProfile, RenderingIntent intent) = 0; virtual void getMonitorProfile (Glib::ustring& monitorProfile, RenderingIntent& intent) const = 0; + virtual void setSoftProofing (bool softProof, bool gamutCheck) = 0; + virtual void getSoftProofing (bool &softProof, bool &gamutCheck) = 0; virtual ~StagedImageProcessor () {} @@ -482,7 +484,7 @@ public: * @param pl is an optional ProgressListener if you want to keep track of the progress * @param tunnelMetaData tunnels IPTC and XMP to output without change * @return the resulting image, with the output profile applied, exif and iptc data set. You have to save it or you can access the pixel data directly. */ -IImage16* processImage (ProcessingJob* job, int& errorCode, ProgressListener* pl = NULL, bool tunnelMetaData = false, bool flush = false); +IImage16* processImage (ProcessingJob* job, int& errorCode, ProgressListener* pl = nullptr, bool tunnelMetaData = false, bool flush = false); /** This class is used to control the batch processing. The class implementing this interface will be called when the full processing of an * image is ready and the next job to process is needed. */ diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 7c6aa5b5b..af42ce8b0 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -41,6 +41,25 @@ #include "StopWatch.h" +namespace +{ + + bool checkRawImageThumb(const rtengine::RawImage& raw_image) + { + if (!raw_image.is_supportedThumb()) { + return false; + } + + const std::size_t length = + fdata(raw_image.get_thumbOffset(), raw_image.get_file())[1] != 0xD8 && raw_image.is_ppmThumb() + ? raw_image.get_thumbWidth() * raw_image.get_thumbHeight() * (raw_image.get_thumbBPS() / 8) * 3 + : raw_image.get_thumbLength(); + + return raw_image.get_thumbOffset() + length <= raw_image.get_file()->size; + } + +} + extern Options options; namespace rtengine @@ -175,8 +194,8 @@ Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataL int err = 1; - // see if it is something we support - if ( ri->is_supportedThumb() && ri->get_thumbOffset() < ri->get_file()->size ) { + // See if it is something we support + if (checkRawImageThumb(*ri)) { const char* data((const char*)fdata(ri->get_thumbOffset(), ri->get_file())); if ( (unsigned char)data[1] == 0xd8 ) { @@ -491,6 +510,17 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati tmph = high; } + const bool rotate_90 = + rotate + && ( + ri->get_rotateDegree() == 90 + || ri->get_rotateDegree() == 270 + ); + + if (rotate_90) { + std::swap(tmpw, tmph); + } + if (fixwh == 1) { // fix height, scale width w = tmpw * h / tmph; } else { @@ -501,8 +531,11 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati delete tpp->thumbImg; } - tpp->thumbImg = nullptr; - tpp->thumbImg = resizeTo(w, h, TI_Bilinear, tmpImg); + if (rotate_90) { + tpp->thumbImg = resizeTo(h, w, TI_Bilinear, tmpImg); + } else { + tpp->thumbImg = resizeTo(w, h, TI_Bilinear, tmpImg); + } delete tmpImg; @@ -735,6 +768,7 @@ void Thumbnail::init () } Thumbnail::Thumbnail () : + iColorMatrix{}, cam2xyz{}, scale(1.0), colorMatrix{}, isRaw(true), camProfile(nullptr), thumbImg(nullptr), camwbRed(1.0), camwbGreen(1.0), camwbBlue(1.0), redAWBMul(-1.0), greenAWBMul(-1.0), blueAWBMul(-1.0), @@ -908,7 +942,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei ImProcFunctions ipf (¶ms, false); ipf.setScale (sqrt(double(fw * fw + fh * fh)) / sqrt(double(thumbImg->width * thumbImg->width + thumbImg->height * thumbImg->height))*scale); - ipf.updateColorProfiles (params.icm, options.rtSettings.monitorProfile, options.rtSettings.monitorIntent); + ipf.updateColorProfiles (params.icm, options.rtSettings.monitorProfile, options.rtSettings.monitorIntent, false, false); LUTu hist16 (65536); @@ -1056,7 +1090,8 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei } } - ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as); + LUTu histToneCurve; + ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); // freeing up some memory customToneCurve1.Reset(); diff --git a/rtengine/rtthumbnail.h b/rtengine/rtthumbnail.h index bc367522d..18e72fc19 100644 --- a/rtengine/rtthumbnail.h +++ b/rtengine/rtthumbnail.h @@ -107,7 +107,7 @@ public: static ImageIO* resizeToSameType(int nw, int nh, TypeInterpolation interp, ImageIO* srcImg) { - ImageIO* imgPtr; + ImageIO* imgPtr = nullptr; if (srcImg->getType() == sImage8) { Image8* castedSrcImg = static_cast(srcImg); diff --git a/rtengine/settings.h b/rtengine/settings.h index 8810322be..b572e7310 100644 --- a/rtengine/settings.h +++ b/rtengine/settings.h @@ -40,6 +40,7 @@ public: Glib::ustring monitorProfile; ///< ICC profile name used for the monitor RenderingIntent monitorIntent; ///< Colorimetric intent used with the above profile + bool monitorBPC; ///< Black Point Compensation for the Labimage->Monitor transform (directly, i.e. not soft-proofing and no WCS in between) bool autoMonitorProfile; ///< Try to auto-determine the correct monitor color profile bool autocielab; bool rgbcurveslumamode_gamut;// controls gamut enforcement for RGB curves in lumamode diff --git a/rtengine/shmap.cc b/rtengine/shmap.cc index bb8e96c11..65c1070a2 100644 --- a/rtengine/shmap.cc +++ b/rtengine/shmap.cc @@ -30,7 +30,7 @@ namespace rtengine extern const Settings* settings; -SHMap::SHMap (int w, int h, bool multiThread) : W(w), H(h), multiThread(multiThread) +SHMap::SHMap (int w, int h, bool multiThread) : max_f(0.f), min_f(0.f), avg(0.f), W(w), H(h), multiThread(multiThread) { map = new float*[H]; diff --git a/rtengine/shmap.h b/rtengine/shmap.h index 97a394927..9bb496b54 100644 --- a/rtengine/shmap.h +++ b/rtengine/shmap.h @@ -21,11 +21,13 @@ #include "imagefloat.h" #include "image16.h" +#include "noncopyable.h" namespace rtengine { -class SHMap +class SHMap : + public NonCopyable { public: diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index d649e3c81..66c6d6aae 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -54,7 +54,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p if (errorCode) { delete job; - return NULL; + return nullptr; } } @@ -165,7 +165,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p NoiseCurve noiseLCurve; NoiseCurve noiseCCurve; - Imagefloat *calclum = NULL ; + Imagefloat *calclum = nullptr ; params.dirpyrDenoise.getCurves(noiseLCurve, noiseCCurve); float autoNR = (float) settings->nrauto;// float autoNRmax = (float) settings->nrautomax;// @@ -273,7 +273,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p float maxr = 0.f; float maxb = 0.f; float pondcorrec = 1.0f; - float chaut, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, nresi, highresi, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc; + float chaut, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc; int Nb; chaut = 0.f; redaut = 0.f; @@ -282,7 +282,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p maxblueaut = 0.f; chromina = 0.f; sigma = 0.f; - ipf.RGB_denoise_info(origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, nresi, highresi, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); + ipf.RGB_denoise_info(origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); float multip = 1.f; float adjustr = 1.f; @@ -490,8 +490,8 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p imgsrc->convertColorSpace(provicalc, params.icm, currWB);//for denoise luminance curve int nb = 0; - float chaut = 0.f, redaut = 0.f, blueaut = 0.f, maxredaut = 0.f, maxblueaut = 0.f, minredaut = 0.f, minblueaut = 0.f, nresi = 0.f, highresi = 0.f, chromina = 0.f, sigma = 0.f, lumema = 0.f, sigma_L = 0.f, redyel = 0.f, skinc = 0.f, nsknc = 0.f; - ipf.RGB_denoise_info(origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, nresi, highresi, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); + float chaut = 0.f, redaut = 0.f, blueaut = 0.f, maxredaut = 0.f, maxblueaut = 0.f, minredaut = 0.f, minblueaut = 0.f, chromina = 0.f, sigma = 0.f, lumema = 0.f, sigma_L = 0.f, redyel = 0.f, skinc = 0.f, nsknc = 0.f; + ipf.RGB_denoise_info(origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); Nb[hcr * 3 + wcr] = nb; ch_M[hcr * 3 + wcr] = chaut; max_r[hcr * 3 + wcr] = maxredaut; @@ -754,7 +754,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } // update blurmap - SHMap* shmap = NULL; + SHMap* shmap = nullptr; if (params.sh.enabled) { shmap = new SHMap (fw, fh, true); @@ -862,7 +862,9 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p DCPProfile::ApplyState as; DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); - ipf.rgbProc (baseImg, labView, NULL, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as); + LUTu histToneCurve; + + ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); if (settings->verbose) { printf("Output image / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", autor, autog, autob); @@ -885,13 +887,13 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p // Freeing baseImg because not used anymore delete baseImg; - baseImg = NULL; + baseImg = nullptr; if (shmap) { delete shmap; } - shmap = NULL; + shmap = nullptr; if (pl) { pl->setProgress (0.55); @@ -937,7 +939,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p CurveFactory::complexsgnCurve (autili, butili, ccutili, cclutili, params.labCurve.acurve, params.labCurve.bcurve, params.labCurve.cccurve, params.labCurve.lccurve, curve1, curve2, satcurve, lhskcurve, 1); - ipf.chromiLuminanceCurve (NULL, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); + ipf.chromiLuminanceCurve (nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); if((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { ipf.EPDToneMap(labView, 5, 1); @@ -1000,13 +1002,12 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } } - int kall = 2; bool wavcontlutili = false; CurveFactory::curveWavContL(wavcontlutili, params.wavelet.wavclCurve, wavclCurve,/* hist16C, dummy,*/ 1); - if((params.wavelet.enabled)) { - ipf.ip_wavelet(labView, labView, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, wavcontlutili, 1); + if(params.wavelet.enabled) { + ipf.ip_wavelet(labView, labView, 2, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, wavcontlutili, 1); } wavCLVCurve.Reset(); @@ -1057,32 +1058,26 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p float CAMMean = NAN; if (params.sharpening.enabled) { - float d; - double dd; - - int sk = 1; - if(settings->ciecamfloat) { - ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, sk, 1); + float d; + ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, 1, 1); } else { + double dd; ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, 1, 1); } } else { - float d; - - double dd; - int sk = 1; - if(settings->ciecamfloat) { - ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, sk, 1); + float d; + ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, 1, 1); } else { + double dd; ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, 1, 1); } } } delete cieView; - cieView = NULL; + cieView = nullptr; @@ -1158,215 +1153,31 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } } - Image16* readyImg = NULL; - cmsHPROFILE jprof = NULL; + Image16* readyImg = nullptr; + cmsHPROFILE jprof = nullptr; bool customGamma = false; bool useLCMS = false; + bool bwonly = params.blackwhite.enabled && !params.colorToning.enabled && !autili && !butili ; if(params.icm.gamma != "default" || params.icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 - cmsMLU *DescriptionMLU, *CopyrightMLU, *DmndMLU, *DmddMLU;// for modification TAG - cmsToneCurve* GammaTRC[3] = { NULL, NULL, NULL }; - cmsFloat64Number Parameters[7]; - double ga0, ga1, ga2, ga3, ga4, ga5, ga6; + GammaValues ga; // if(params.blackwhite.enabled) params.toneCurve.hrenabled=false; - readyImg = ipf.lab2rgb16b (labView, cx, cy, cw, ch, params.icm.output, params.icm.outputIntent, params.icm.working, params.icm.gamma, params.icm.freegamma, params.icm.gampos, params.icm.slpos, ga0, ga1, ga2, ga3, ga4, ga5, ga6, params.blackwhite.enabled ); + readyImg = ipf.lab2rgb16 (labView, cx, cy, cw, ch, params.icm, bwonly, &ga); customGamma = true; //or selected Free gamma useLCMS = false; - bool pro = false; - Glib::ustring chpro, outProfile; - bool present_space[10] = {false, false, false, false, false, false, false, false, false, false}; - std::vector opnames = iccStore->getProfiles (); - - //test if files are in system - for (int j = 0; j < 10; j++) { - // one can modify "option" [Color Management] to adapt the profile's name if they are different for windows, MacOS, Linux ?? - // some of them are actually provided by RT, thanks to Jacques Desmis - if (j == 0) { - chpro = options.rtSettings.prophoto; - } else if(j == 1) { - chpro = options.rtSettings.adobe; - } else if(j == 2) { - chpro = options.rtSettings.widegamut; - } else if(j == 3) { - chpro = options.rtSettings.beta; - } else if(j == 4) { - chpro = options.rtSettings.best; - } else if(j == 5) { - chpro = options.rtSettings.bruce; - } else if(j == 6) { - chpro = options.rtSettings.srgb; - } else if(j == 7) { - chpro = options.rtSettings.srgb10; //gamma 1.0 - } else if(j == 8) { - chpro = options.rtSettings.prophoto10; //gamma 1.0 - } else if(j == 9) { - chpro = options.rtSettings.rec2020; - } - - for (unsigned int i = 0; i < opnames.size(); i++) { - if(chpro.compare(opnames[i]) == 0) { - present_space[j] = true; - } - } - - if (!present_space[j] && settings->verbose) { - printf("Missing file: %s\n", chpro.c_str()); - } - } - - if (params.icm.freegamma && params.icm.gampos < 1.35) { - pro = true; //select profil with gammaTRC modified : - } else if (params.icm.gamma == "linear_g1.0" || (params.icm.gamma == "High_g1.3_s3.35")) { - pro = true; //pro=0 RT_sRGB || Prophoto - } - - // Check that output profiles exist, otherwise use LCMS2 - // Use the icc/icm profiles associated to possible working profiles, set in "options" - if (params.icm.working == "ProPhoto" && present_space[0] && !pro) { - outProfile = options.rtSettings.prophoto; - } else if (params.icm.working == "Adobe RGB" && present_space[1] ) { - outProfile = options.rtSettings.adobe; - } else if (params.icm.working == "WideGamut" && present_space[2] ) { - outProfile = options.rtSettings.widegamut; - } else if (params.icm.working == "Beta RGB" && present_space[3] ) { - outProfile = options.rtSettings.beta; - } else if (params.icm.working == "BestRGB" && present_space[4] ) { - outProfile = options.rtSettings.best; - } else if (params.icm.working == "BruceRGB" && present_space[5] ) { - outProfile = options.rtSettings.bruce; - } else if (params.icm.working == "sRGB" && present_space[6] && !pro) { - outProfile = options.rtSettings.srgb; - } else if (params.icm.working == "sRGB" && present_space[7] && pro) { - outProfile = options.rtSettings.srgb10; - } else if (params.icm.working == "ProPhoto" && present_space[8] && pro) { - outProfile = options.rtSettings.prophoto10; - } else if (params.icm.working == "Rec2020" && present_space[9]) { - outProfile = options.rtSettings.rec2020; - } else { - // Should not occurs - if (settings->verbose) { - printf("\"%s\": unknown working profile! - use LCMS2 substitution\n", params.icm.working.c_str() ); - } + if ((jprof = iccStore->createCustomGammaOutputProfile (params.icm, ga)) == nullptr) { useLCMS = true; } - //begin adaptation rTRC gTRC bTRC - //"jprof" profile has the same characteristics than RGB values, but TRC are adapted... for applying profile - if (!useLCMS) { - if (settings->verbose) { - printf("Output Gamma - profile: \"%s\"\n", outProfile.c_str() ); //c_str() - } - - jprof = iccStore->getProfile(outProfile); //get output profile - - if (jprof == NULL) { - useLCMS = true; - - if (settings->verbose) { - printf("\"%s\" ICC output profile not found!\n", outProfile.c_str()); - } - } else { - Parameters[0] = ga0; - Parameters[1] = ga1; - Parameters[2] = ga2; - Parameters[3] = ga3; - Parameters[4] = ga4; - Parameters[5] = ga5; - Parameters[6] = ga6; - // 7 parameters for smoother curves - //change desc Tag , to "free gamma", or "BT709", etc. - cmsContext ContextID = cmsGetProfileContextID(jprof);//modification TAG - DescriptionMLU = cmsMLUalloc(ContextID, 1); - CopyrightMLU = cmsMLUalloc(ContextID, 1);//for ICC - DmndMLU = cmsMLUalloc(ContextID, 1); //for ICC - DmddMLU = cmsMLUalloc(ContextID, 1); // for ICC - - - // instruction with //ICC are used for generate icc profile - if (DescriptionMLU == NULL) { - printf("Description error\n"); - } - - cmsMLUsetWide(CopyrightMLU, "en", "US", L"General Public License - AdobeRGB compatible") ;//adapt to profil - cmsMLUsetWide(DmndMLU, "en", "US", L"RawTherapee") ; - cmsMLUsetWide(DmddMLU, "en", "US", L"RTMedium") ; //adapt to profil - - //display Tag desc with : selection of gamma and Primaries - if (!params.icm.freegamma) { - std::wstring gammaStr; - - if(params.icm.gamma == "High_g1.3_s3.35") { - gammaStr = std::wstring(L"GammaTRC: High g=1.3 s=3.35"); - } else if (params.icm.gamma == "Low_g2.6_s6.9") { - gammaStr = std::wstring(L"GammaTRC: Low g=2.6 s=6.9"); - } else if (params.icm.gamma == "sRGB_g2.4_s12.92") { - gammaStr = std::wstring(L"GammaTRC: sRGB g=2.4 s=12.92"); - } else if (params.icm.gamma == "BT709_g2.2_s4.5") { - gammaStr = std::wstring(L"GammaTRC: BT709 g=2.2 s=4.5"); - } else if (params.icm.gamma == "linear_g1.0") { - gammaStr = std::wstring(L"GammaTRC: Linear g=1.0"); - } else if (params.icm.gamma == "standard_g2.2") { - gammaStr = std::wstring(L"GammaTRC: g=2.2"); - } else if (params.icm.gamma == "standard_g1.8") { - gammaStr = std::wstring(L"GammaTRC: g=1.8"); - } - - cmsMLUsetWide(DescriptionMLU, "en", "US", gammaStr.c_str()); - - //for elaboration ICC profiles - // else if (params.icm.gamma== "sRGB_g2.4_s12.92" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Medium gamma sRGB(AdobeRGB compatible)"); - // else if (params.icm.gamma== "BT709_g2.2_s4.5" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_sRGB gamma BT709(IEC61966 equivalent)"); - // else if (params.icm.gamma== "sRGB_g2.4_s12.92" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_sRGB gamma sRGB(IEC61966 equivalent)"); - // else if (params.icm.gamma== "linear_g1.0" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_sRGB gamma Linear1.0(IEC61966 equivalent)"); - //else if (params.icm.gamma== "BT709_g2.2_s4.5" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Large gamma BT709(Prophoto compatible)"); - // else if (params.icm.gamma== "sRGB_g2.4_s12.92" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Large gamma sRGB(Prophoto compatible)"); - // else if (params.icm.gamma== "linear_g1.0" && !params.icm.freegamma) cmsMLUsetWide(DescriptionMLU, "en", "US", L"RT_Large gamma Linear1.0(Prophoto compatible)"); - } else { - // create description with gamma + slope + primaries - std::wostringstream gammaWs; - gammaWs.precision(2); - gammaWs << "Manual GammaTRC: g=" << (float)params.icm.gampos << " s=" << (float)params.icm.slpos; - cmsMLUsetWide(DescriptionMLU, "en", "US", gammaWs.str().c_str()); - } - - cmsWriteTag(jprof, cmsSigProfileDescriptionTag, DescriptionMLU);//desc changed - // cmsWriteTag(jprof, cmsSigCopyrightTag, CopyrightMLU); - // cmsWriteTag(jprof, cmsSigDeviceMfgDescTag, DmndMLU); - // cmsWriteTag(jprof, cmsSigDeviceModelDescTag, DmddMLU); - - // Calculate output profile's rTRC bTRC gTRC - GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(NULL, 5, Parameters); - cmsWriteTag(jprof, cmsSigGreenTRCTag, (void*)GammaTRC[1] ); - cmsWriteTag(jprof, cmsSigRedTRCTag, (void*)GammaTRC[0] ); - cmsWriteTag(jprof, cmsSigBlueTRCTag, (void*)GammaTRC[2] ); - //for generation ICC profiles : here Prophoto ==> Large - // if(params.icm.gamma== "BT709_g2.2_s4.5") cmsSaveProfileToFile(jprof, "RT_sRGB_gBT709.icm"); - // else if (params.icm.gamma== "sRGB_g2.4_s12.92") cmsSaveProfileToFile(jprof, "RT_Medium_gsRGB.icc"); - // else if (params.icm.gamma== "linear_g1.0") cmsSaveProfileToFile(jprof, "RT_Large_g10.icc"); - - - } - } - - if (GammaTRC[0]) { - cmsFreeToneCurve(GammaTRC[0]); - } } else { // if Default gamma mode: we use the profile selected in the "Output profile" combobox; // gamma come from the selected profile, otherwise it comes from "Free gamma" tool - // readyImg = ipf.lab2rgb16 (labView, cx, cy, cw, ch, params.icm.output, params.blackwhite.enabled); - bool bwonly = params.blackwhite.enabled && !params.colorToning.enabled ; - - if(autili || butili ) { - bwonly = false; - } - - readyImg = ipf.lab2rgb16 (labView, cx, cy, cw, ch, params.icm.output, params.icm.outputIntent, bwonly); + readyImg = ipf.lab2rgb16 (labView, cx, cy, cw, ch, params.icm, bwonly); if (settings->verbose) { printf("Output profile_: \"%s\"\n", params.icm.output.c_str()); @@ -1374,21 +1185,19 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } delete labView; - labView = NULL; + labView = nullptr; - if(!autili && !butili ) { - if(params.blackwhite.enabled && !params.colorToning.enabled ) {//force BW r=g=b - if (settings->verbose) { - printf("Force BW\n"); - } + if(bwonly) { //force BW r=g=b + if (settings->verbose) { + printf("Force BW\n"); + } - for (int ccw = 0; ccw < cw; ccw++) { - for (int cch = 0; cch < ch; cch++) { - readyImg->r(cch, ccw) = readyImg->g(cch, ccw); - readyImg->b(cch, ccw) = readyImg->g(cch, ccw); - } + for (int ccw = 0; ccw < cw; ccw++) { + for (int cch = 0; cch < ch; cch++) { + readyImg->r(cch, ccw) = readyImg->g(cch, ccw); + readyImg->b(cch, ccw) = readyImg->g(cch, ccw); } } } @@ -1414,42 +1223,33 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p // Setting the output curve to readyImg if (customGamma) { if (!useLCMS) { - // use corrected sRGB profile in order to apply a good TRC if present, otherwise use LCMS2 profile generated by lab2rgb16b + // use corrected sRGB profile in order to apply a good TRC if present, otherwise use LCMS2 profile generated by lab2rgb16 w/ gamma ProfileContent pc(jprof); readyImg->setOutputProfile (pc.data, pc.length); } } else { - // use RT_sRGB.icm profile if present, otherwise use LCMS2 profile generate by lab2rgb16b - Glib::ustring outputProfile; + // use the selected output profile if present, otherwise use LCMS2 profile generate by lab2rgb16 w/ gamma if (params.icm.output != "" && params.icm.output != ColorManagementParams::NoICMString) { - outputProfile = params.icm.output; - - /* if we'd wanted the RT_sRGB profile we would have selected it - else { - // use RT_sRGB.icm profile if present, otherwise use LCMS2 profile generate by lab2rgb16b - if (settings->verbose) printf("No output profiles set ; looking for the default sRGB profile (\"%s\")...\n", options.rtSettings.srgb.c_str()); - outputProfile = options.rtSettings.srgb; - }*/ // if iccStore->getProfile send back an object, then iccStore->getContent will do too - cmsHPROFILE jprof = iccStore->getProfile(outputProfile); //get outProfile + cmsHPROFILE jprof = iccStore->getProfile(params.icm.output); //get outProfile - if (jprof == NULL) { + if (jprof == nullptr) { if (settings->verbose) { - printf("\"%s\" ICC output profile not found!\n - use LCMS2 substitution\n", outputProfile.c_str()); + printf("\"%s\" ICC output profile not found!\n - use LCMS2 substitution\n", params.icm.output.c_str()); } } else { if (settings->verbose) { - printf("Using \"%s\" output profile\n", outputProfile.c_str()); + printf("Using \"%s\" output profile\n", params.icm.output.c_str()); } - ProfileContent pc = iccStore->getContent (outputProfile); + ProfileContent pc = iccStore->getContent (params.icm.output); readyImg->setOutputProfile (pc.data, pc.length); } } else { // No ICM - readyImg->setOutputProfile (NULL, 0); + readyImg->setOutputProfile (nullptr, 0); } } @@ -1492,13 +1292,13 @@ void batchProcessingThread (ProcessingJob* job, BatchProcessingListener* bpl, bo if (errorCode) { bpl->error (M("MAIN_MSG_CANNOTLOAD")); - currentJob = NULL; + currentJob = nullptr; } else { try { currentJob = bpl->imageReady (img); } catch (Glib::Exception& ex) { bpl->error (ex.what()); - currentJob = NULL; + currentJob = nullptr; } } } diff --git a/rtengine/stdimagesource.cc b/rtengine/stdimagesource.cc index e422d23b2..6017a1ca6 100644 --- a/rtengine/stdimagesource.cc +++ b/rtengine/stdimagesource.cc @@ -51,15 +51,11 @@ template T** allocArray (int W, int H) } #define HR_SCALE 2 -StdImageSource::StdImageSource () : ImageSource(), img(NULL), plistener(NULL) +StdImageSource::StdImageSource () : ImageSource(), img(nullptr), plistener(nullptr), full(false), max{}, rgbSourceModified(false) { - hrmap[0] = NULL; - hrmap[1] = NULL; - hrmap[2] = NULL; - needhr = NULL; - embProfile = NULL; - idata = NULL; + embProfile = nullptr; + idata = nullptr; } StdImageSource::~StdImageSource () @@ -67,17 +63,6 @@ StdImageSource::~StdImageSource () delete idata; - if (hrmap[0] != NULL) { - int dh = img->getH() / HR_SCALE; - freeArray(hrmap[0], dh); - freeArray(hrmap[1], dh); - freeArray(hrmap[2], dh); - } - - if (needhr) { - freeArray(needhr, img->getH()); - } - if (img) { delete img; } @@ -178,7 +163,7 @@ int StdImageSource::load (const Glib::ustring &fname, bool batch) if (error) { delete img; - img = NULL; + img = nullptr; return error; } @@ -243,7 +228,7 @@ void StdImageSource::colorSpaceConversion (Imagefloat* im, const ColorManagement { bool skipTransform = false; - cmsHPROFILE in = NULL; + cmsHPROFILE in = nullptr; cmsHPROFILE out = iccStore->workingSpace (cmp.working); if (cmp.input == "(embedded)" || cmp.input == "" || cmp.input == "(camera)" || cmp.input == "(cameraICC)") { @@ -260,9 +245,9 @@ void StdImageSource::colorSpaceConversion (Imagefloat* im, const ColorManagement if (cmp.input != "(none)") { in = iccStore->getProfile (cmp.input); - if (in == NULL && embedded) { + if (in == nullptr && embedded) { in = embedded; - } else if (in == NULL) { + } else if (in == nullptr) { if (sampleFormat & (IIOSF_LOGLUV24 | IIOSF_LOGLUV32 | IIOSF_FLOAT)) { skipTransform = true; } else { @@ -311,7 +296,7 @@ void StdImageSource::getFullSize (int& w, int& h, int tr) } } -void StdImageSource::getSize (int tran, PreviewProps pp, int& w, int& h) +void StdImageSource::getSize (PreviewProps pp, int& w, int& h) { w = pp.w / pp.skip + (pp.w % pp.skip > 0); diff --git a/rtengine/stdimagesource.h b/rtengine/stdimagesource.h index 048f3b3c0..0ef487a75 100644 --- a/rtengine/stdimagesource.h +++ b/rtengine/stdimagesource.h @@ -32,8 +32,6 @@ protected: ColorTemp wb; ProgressListener* plistener; bool full; - float** hrmap[3]; - char** needhr; int max[3]; bool rgbSourceModified; @@ -66,7 +64,7 @@ public: } void getFullSize (int& w, int& h, int tr = TR_NONE); - void getSize (int tran, PreviewProps pp, int& w, int& h); + void getSize (PreviewProps pp, int& w, int& h); ImageData* getImageData () { @@ -78,7 +76,7 @@ public: } ImageMatrices* getImageMatrices () { - return (ImageMatrices*)NULL; + return (ImageMatrices*)nullptr; } bool isRAW() const { diff --git a/rtengine/utils.cc b/rtengine/utils.cc index 2366f3a0c..b862e290f 100644 --- a/rtengine/utils.cc +++ b/rtengine/utils.cc @@ -168,9 +168,7 @@ void rotate (unsigned char* img, int& w, int& h, int deg) rotated[3 * (j * h + h - i - 1) + 2] = img[ix++]; } - int tmp = w; - w = h; - h = tmp; + std::swap(w,h); } else if (deg == 270) { for (int i = 0; i < h; i++) for (int j = 0; j < w; j++) { @@ -179,10 +177,8 @@ void rotate (unsigned char* img, int& w, int& h, int deg) rotated[3 * (h * (w - j - 1) + i) + 2] = img[ix++]; } - int tmp = w; - w = h; - h = tmp; - } else if (deg == 180) + std::swap(w,h); + } else /*if (deg == 180) */ for (int i = 0; i < h; i++) for (int j = 0; j < w; j++) { rotated[3 * (w * (h - i - 1) + w - j - 1) + 0] = img[ix++]; diff --git a/rtexif/canonattribs.cc b/rtexif/canonattribs.cc index bd14c6514..7fa01f624 100644 --- a/rtexif/canonattribs.cc +++ b/rtexif/canonattribs.cc @@ -101,7 +101,7 @@ public: } char buffer[32]; - sprintf (buffer, "%.1fs %s", sec / 10., sec & 0x4000 ? ",Custom" : ""); + sprintf (buffer, "%.1fs %s", sec / 10., (sec & 0x4000) ? ",Custom" : ""); return buffer; } }; @@ -965,7 +965,7 @@ public: std::ostringstream candidates; for (r = choices.lower_bound(lensID); r != choices.upper_bound(lensID); r++) { - double a1, a2, f1, f2, lensAperture, dif; + double a1, a2, f1, f2, dif; if( !extractLensInfo( r->second , f1, f2, a1, a2) ) { continue; @@ -988,6 +988,7 @@ public: } if( maxApertureAtFocal > 0.1) { + double lensAperture; if( maxApertureAtFocal < a1 - 0.15 || maxApertureAtFocal > a2 + 0.15) { continue; } @@ -1779,205 +1780,205 @@ public: CAAspectRatioInterpreter caAspectRatioInterpreter; const TagAttrib canonCameraSettingsAttribs[] = { - {0, AC_WRITE, 0, 0, 1, AUTO, "MacroMode", &caMacroModeInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "SelfTimer", &caSelfTimerInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "Quality", &caQualityInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "CanonFlashMode", &caFlashModeInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "ContinuousDrive", &caContinuousDriveInterpreter}, - {0, AC_WRITE, 0, 0, 7, AUTO, "FocusMode", &caFocusModeInterpreter}, - {0, AC_WRITE, 0, 0, 9, AUTO, "RecordMode", &caRecordModeInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "CanonImageSize", &caImageSizeInterpreter}, - {0, AC_WRITE, 0, 0, 11, AUTO, "EasyMode", &caEasyModeInterpreter}, - {0, AC_WRITE, 0, 0, 12, AUTO, "DigitalZoom", &caDigitalZoomInterpreter}, - {0, AC_WRITE, 0, 0, 13, AUTO, "Contrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 14, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 15, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 16, AUTO, "CameraISO", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 17, AUTO, "MeteringMode", &caMeteringModeInterpreter}, - {0, AC_WRITE, 0, 0, 18, AUTO, "FocusRange", &caFocusRangeInterpreter}, - {0, AC_WRITE, 0, 0, 19, AUTO, "AFPoint", &caAFPointInterpreter}, - {0, AC_WRITE, 0, 0, 20, AUTO, "CanonExposureMode", &caExposureModeInterpreter}, - {0, AC_WRITE, 0, 0, 22, AUTO, "LensID", &caLensInterpreter}, - {0, AC_WRITE, 0, 0, 23, AUTO, "LongFocal", &caFocalInterpreter}, - {0, AC_WRITE, 0, 0, 24, AUTO, "ShortFocal", &caFocalInterpreter}, - {0, AC_WRITE, 0, 0, 25, AUTO, "FocalUnits", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 26, AUTO, "MaxAperture", &caApertureInterpreter}, - {0, AC_WRITE, 0, 0, 27, AUTO, "MinAperture", &caApertureInterpreter}, - {0, AC_WRITE, 0, 0, 28, AUTO, "FlashActivity", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 29, AUTO, "FlashBits", &caFlashBitsInterpreter}, - {0, AC_WRITE, 0, 0, 32, AUTO, "FocusContinuous", &caFocusContinuousInterpreter}, - {0, AC_WRITE, 0, 0, 33, AUTO, "AESetting", &caAESettingsInterpreter}, - {0, AC_WRITE, 0, 0, 34, AUTO, "ImageStabilization", &caStabilizationInterpreter}, - {0, AC_WRITE, 0, 0, 35, AUTO, "DisplayAperture", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 36, AUTO, "ZoomSourceWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 37, AUTO, "ZoomTargetWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 39, AUTO, "SpotMeteringMode", &caSpotMeteringInterpreter}, - {0, AC_WRITE, 0, 0, 40, AUTO, "PhotoEffect", &caPhotoEffectInterpreter}, - {0, AC_WRITE, 0, 0, 41, AUTO, "ManualFlashOutput", &caManualFlashInterpreter}, - {0, AC_WRITE, 0, 0, 42, AUTO, "ColorTone", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 46, AUTO, "SRAWQuality", &caRAWQualityInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 1, AUTO, "MacroMode", &caMacroModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "SelfTimer", &caSelfTimerInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "Quality", &caQualityInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "CanonFlashMode", &caFlashModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "ContinuousDrive", &caContinuousDriveInterpreter}, + {0, AC_WRITE, 0, nullptr, 7, AUTO, "FocusMode", &caFocusModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "RecordMode", &caRecordModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "CanonImageSize", &caImageSizeInterpreter}, + {0, AC_WRITE, 0, nullptr, 11, AUTO, "EasyMode", &caEasyModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 12, AUTO, "DigitalZoom", &caDigitalZoomInterpreter}, + {0, AC_WRITE, 0, nullptr, 13, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 14, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 15, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 16, AUTO, "CameraISO", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "MeteringMode", &caMeteringModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 18, AUTO, "FocusRange", &caFocusRangeInterpreter}, + {0, AC_WRITE, 0, nullptr, 19, AUTO, "AFPoint", &caAFPointInterpreter}, + {0, AC_WRITE, 0, nullptr, 20, AUTO, "CanonExposureMode", &caExposureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 22, AUTO, "LensID", &caLensInterpreter}, + {0, AC_WRITE, 0, nullptr, 23, AUTO, "LongFocal", &caFocalInterpreter}, + {0, AC_WRITE, 0, nullptr, 24, AUTO, "ShortFocal", &caFocalInterpreter}, + {0, AC_WRITE, 0, nullptr, 25, AUTO, "FocalUnits", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 26, AUTO, "MaxAperture", &caApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 27, AUTO, "MinAperture", &caApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 28, AUTO, "FlashActivity", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 29, AUTO, "FlashBits", &caFlashBitsInterpreter}, + {0, AC_WRITE, 0, nullptr, 32, AUTO, "FocusContinuous", &caFocusContinuousInterpreter}, + {0, AC_WRITE, 0, nullptr, 33, AUTO, "AESetting", &caAESettingsInterpreter}, + {0, AC_WRITE, 0, nullptr, 34, AUTO, "ImageStabilization", &caStabilizationInterpreter}, + {0, AC_WRITE, 0, nullptr, 35, AUTO, "DisplayAperture", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 36, AUTO, "ZoomSourceWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 37, AUTO, "ZoomTargetWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 39, AUTO, "SpotMeteringMode", &caSpotMeteringInterpreter}, + {0, AC_WRITE, 0, nullptr, 40, AUTO, "PhotoEffect", &caPhotoEffectInterpreter}, + {0, AC_WRITE, 0, nullptr, 41, AUTO, "ManualFlashOutput", &caManualFlashInterpreter}, + {0, AC_WRITE, 0, nullptr, 42, AUTO, "ColorTone", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 46, AUTO, "SRAWQuality", &caRAWQualityInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib canonFocalLengthAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "FocalType", &caFocalTypeInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "FocalLength", &caFocalInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "FocalPlaneXSize", &caFocalPlaneInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "FocalPlaneYSize", &caFocalPlaneInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "FocalType", &caFocalTypeInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "FocalLength", &caFocalInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "FocalPlaneXSize", &caFocalPlaneInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "FocalPlaneYSize", &caFocalPlaneInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib canonShotInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 1, AUTO, "AutoISO", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "BaseISO" , &caBaseISOInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "MeasuredEV", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "TargetAperture", &caApertureInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "TargetExposureTime", &caExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 6, AUTO, "ExposureCompensation", &caEVInterpreter}, - {0, AC_WRITE, 0, 0, 7, AUTO, "WhiteBalance", &caWhiteBalanceInterpreter}, - {0, AC_WRITE, 0, 0, 8, AUTO, "SlowShutter", &caSlowShutterInterpreter}, - {0, AC_WRITE, 0, 0, 9, AUTO, "SequenceNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "OpticalZoomCode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 13, AUTO, "FlashGuideNumber" , &caFlashGuideNumberInterpreter}, - {0, AC_WRITE, 0, 0, 14, AUTO, "AFPointsInFocus", &caAFPointsInFocusInterpreter}, - {0, AC_WRITE, 0, 0, 15, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 16, AUTO, "AutoExposureBracketing", &caAutoExposureBracketingInterpreter}, - {0, AC_WRITE, 0, 0, 17, AUTO, "AEBBracketValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 18, AUTO, "ControlMode", &caControModeInterpreter}, - {0, AC_WRITE, 0, 0, 21, AUTO, "FNumber" , &caApertureInterpreter}, - {0, AC_WRITE, 0, 0, 22, AUTO, "ExposureTime", &caExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 23, AUTO, "MeasuredEV2", &caMeasuredEVInterpreter}, - {0, AC_WRITE, 0, 0, 24, AUTO, "BulbDuration", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 26, AUTO, "CameraType", &caCameraTypeInterpreter}, - {0, AC_WRITE, 0, 0, 27, AUTO, "AutoRotate", &caAutoRotateInterpreter}, - {0, AC_WRITE, 0, 0, 28, AUTO, "NDFilter", &caOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 29, AUTO, "Self-timer2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 33, AUTO, "FlashOutput", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "AutoISO", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "BaseISO" , &caBaseISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "MeasuredEV", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "TargetAperture", &caApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "TargetExposureTime", &caExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 6, AUTO, "ExposureCompensation", &caEVInterpreter}, + {0, AC_WRITE, 0, nullptr, 7, AUTO, "WhiteBalance", &caWhiteBalanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 8, AUTO, "SlowShutter", &caSlowShutterInterpreter}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "SequenceNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "OpticalZoomCode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 13, AUTO, "FlashGuideNumber" , &caFlashGuideNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 14, AUTO, "AFPointsInFocus", &caAFPointsInFocusInterpreter}, + {0, AC_WRITE, 0, nullptr, 15, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 16, AUTO, "AutoExposureBracketing", &caAutoExposureBracketingInterpreter}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "AEBBracketValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 18, AUTO, "ControlMode", &caControModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 21, AUTO, "FNumber" , &caApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 22, AUTO, "ExposureTime", &caExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 23, AUTO, "MeasuredEV2", &caMeasuredEVInterpreter}, + {0, AC_WRITE, 0, nullptr, 24, AUTO, "BulbDuration", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 26, AUTO, "CameraType", &caCameraTypeInterpreter}, + {0, AC_WRITE, 0, nullptr, 27, AUTO, "AutoRotate", &caAutoRotateInterpreter}, + {0, AC_WRITE, 0, nullptr, 28, AUTO, "NDFilter", &caOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 29, AUTO, "Self-timer2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 33, AUTO, "FlashOutput", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}, }; const TagAttrib canonFileInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 1, AUTO, "FileNumber", &caFileNumberInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "BracketMode", &caBracketModeInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "BracketValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "BracketShotNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 6, AUTO, "RawJpgQuality", &caRAWJpegQualityInterpreter}, - {0, AC_WRITE, 0, 0, 7, AUTO, "RawJpgSize", &caJpegSizeInterpreter}, - {0, AC_WRITE, 0, 0, 8, AUTO, "NoiseReduction", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 9, AUTO, "WBBracketMode" , &caWBBracketModeInterpreter}, - {0, AC_WRITE, 0, 0, 12, AUTO, "WBBracketValueAB", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 13, AUTO, "WBBracketValueGM", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 14, AUTO, "FilterEffect" , &caFilterEffectInterpreter}, - {0, AC_WRITE, 0, 0, 15, AUTO, "ToningEffect" , &caToningEffectInterpreter}, - {0, AC_WRITE, 0, 0, 19, AUTO, "LiveViewShooting" , &caOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 20, AUTO, "FocusDistanceUpper", &caFocusDistanceInterpreter}, - {0, AC_WRITE, 0, 0, 21, AUTO, "FocusDistanceLower", &caFocusDistanceInterpreter}, - {0, AC_WRITE, 0, 0, 25, AUTO, "FlashExposureLock" , &caOnOffInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "FileNumber", &caFileNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "BracketMode", &caBracketModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "BracketValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "BracketShotNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 6, AUTO, "RawJpgQuality", &caRAWJpegQualityInterpreter}, + {0, AC_WRITE, 0, nullptr, 7, AUTO, "RawJpgSize", &caJpegSizeInterpreter}, + {0, AC_WRITE, 0, nullptr, 8, AUTO, "NoiseReduction", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "WBBracketMode" , &caWBBracketModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 12, AUTO, "WBBracketValueAB", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 13, AUTO, "WBBracketValueGM", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 14, AUTO, "FilterEffect" , &caFilterEffectInterpreter}, + {0, AC_WRITE, 0, nullptr, 15, AUTO, "ToningEffect" , &caToningEffectInterpreter}, + {0, AC_WRITE, 0, nullptr, 19, AUTO, "LiveViewShooting" , &caOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 20, AUTO, "FocusDistanceUpper", &caFocusDistanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 21, AUTO, "FocusDistanceLower", &caFocusDistanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 25, AUTO, "FlashExposureLock" , &caOnOffInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}, }; const TagAttrib canonProcessingInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 1, AUTO, "ToneCurve", &caToneCurveInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "SharpnessFrequency", &caSharpnessFrequencyInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "SensorRedLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "SensorBlueLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 6, AUTO, "WhiteBalanceRed", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 7, AUTO, "WhiteBalanceBlue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 8, AUTO, "WhiteBalance", &caWhiteBalanceInterpreter}, - {0, AC_WRITE, 0, 0, 9, AUTO, "ColorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "PictureStyle", &caPictureStyleInterpreter}, - {0, AC_WRITE, 0, 0, 11, AUTO, "DigitalGain", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 12, AUTO, "WBShiftAB", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 13, AUTO, "WBShiftGM", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ToneCurve", &caToneCurveInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "SharpnessFrequency", &caSharpnessFrequencyInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "SensorRedLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "SensorBlueLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 6, AUTO, "WhiteBalanceRed", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 7, AUTO, "WhiteBalanceBlue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 8, AUTO, "WhiteBalance", &caWhiteBalanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "PictureStyle", &caPictureStyleInterpreter}, + {0, AC_WRITE, 0, nullptr, 11, AUTO, "DigitalGain", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 12, AUTO, "WBShiftAB", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 13, AUTO, "WBShiftGM", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}, }; const TagAttrib canonPanoramaInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 2, AUTO, "PanoramaFrameNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "PanoramaDirection", &caPanoramaDirectionInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "PanoramaFrameNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "PanoramaDirection", &caPanoramaDirectionInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}, }; const TagAttrib canonCropInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "CropLeftMargin", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "CropRightMargin", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "CropTopMargin", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "CropBottomMargin", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 0, AUTO, "CropLeftMargin", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "CropRightMargin", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "CropTopMargin", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "CropBottomMargin", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}, }; const TagAttrib canonAspectInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "AspectRatio", &caAspectRatioInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "CroppedImageWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "CroppedImageHeight", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 0, AUTO, "AspectRatio", &caAspectRatioInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "CroppedImageWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "CroppedImageHeight", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}, }; const TagAttrib canonMicroAdjustAttrib[] = { - {0, AC_WRITE, 0, 0, 1, AUTO, "AFMicroAdjActive", &caOnOffInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 2, AUTO, "", NULL}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "AFMicroAdjActive", &caOnOffInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 2, AUTO, "", nullptr}, }; const TagAttrib canonAttribs[] = { {0, AC_WRITE, 0, canonCameraSettingsAttribs, 0x0001, AUTO, "CanonCameraSettings", &stdInterpreter}, {0, AC_WRITE, 0, canonFocalLengthAttribs, 0x0002, AUTO, "CanonFocalLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0003, AUTO, "CanonFlashInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "CanonFlashInfo", &stdInterpreter}, {0, AC_WRITE, 0, canonShotInfoAttribs, 0x0004, AUTO, "CanonShotInfo", &stdInterpreter}, {0, AC_WRITE, 0, canonPanoramaInfoAttribs, 0x0005, AUTO, "CanonPanorama", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0006, AUTO, "CanonImageType", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0007, AUTO, "CanonFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0008, AUTO, "FileNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0009, AUTO, "OwnerName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000a, AUTO, "ColorInfoD30", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000c, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000d, AUTO, "CanonCameraInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000e, AUTO, "CanonFileLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000f, AUTO, "CustomFunctions", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0010, AUTO, "CanonModelID", &caModelIDInterpreter}, - {0, AC_WRITE, 0, 0, 0x0012, AUTO, "CanonAFInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0015, AUTO, "SerialNumberFormat", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001c, AUTO, "DateStampMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001d, AUTO, "MyColors", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001e, AUTO, "FirmwareRevision", &stdInterpreter}, - {0, AC_NEW, 0, 0, 0x0024, AUTO, "FaceDetect1", &stdInterpreter}, - {0, AC_NEW, 0, 0, 0x0025, AUTO, "FaceDetect2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0026, AUTO, "CanonAFInfo2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0083, AUTO, "OriginalDecisionData", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0090, AUTO, "CustomFunctions1D", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0091, AUTO, "PersonalFunctions", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0092, AUTO, "PersonalFunctionValues", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0006, AUTO, "CanonImageType", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0007, AUTO, "CanonFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0008, AUTO, "FileNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0009, AUTO, "OwnerName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000a, AUTO, "ColorInfoD30", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000c, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000d, AUTO, "CanonCameraInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000e, AUTO, "CanonFileLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000f, AUTO, "CustomFunctions", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0010, AUTO, "CanonModelID", &caModelIDInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0012, AUTO, "CanonAFInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0015, AUTO, "SerialNumberFormat", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001c, AUTO, "DateStampMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001d, AUTO, "MyColors", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001e, AUTO, "FirmwareRevision", &stdInterpreter}, + {0, AC_NEW, 0, nullptr, 0x0024, AUTO, "FaceDetect1", &stdInterpreter}, + {0, AC_NEW, 0, nullptr, 0x0025, AUTO, "FaceDetect2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0026, AUTO, "CanonAFInfo2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0083, AUTO, "OriginalDecisionData", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0090, AUTO, "CustomFunctions1D", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0091, AUTO, "PersonalFunctions", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0092, AUTO, "PersonalFunctionValues", &stdInterpreter}, {0, AC_WRITE, 0, canonFileInfoAttribs, 0x0093, AUTO, "CanonFileInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0094, AUTO, "AFPointsInFocus1D", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0095, AUTO, "LensType", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0096, AUTO, "InternalSerialNumber", &caIntSerNumInterpreter}, - {0, AC_WRITE, 0, 0, 0x0097, AUTO, "DustRemovalData", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0094, AUTO, "AFPointsInFocus1D", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0095, AUTO, "LensType", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0096, AUTO, "InternalSerialNumber", &caIntSerNumInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0097, AUTO, "DustRemovalData", &stdInterpreter}, {0, AC_WRITE, 0, canonCropInfoAttribs, 0x0098, AUTO, "CropInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0099, AUTO, "CustomFunctions2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0099, AUTO, "CustomFunctions2", &stdInterpreter}, {0, AC_WRITE, 0, canonAspectInfoAttribs, 0x009a, AUTO, "AspectInfo", &stdInterpreter}, {0, AC_WRITE, 0, canonProcessingInfoAttribs, 0x00a0, AUTO, "ProcessingInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a1, AUTO, "ToneCurveTable", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a2, AUTO, "SharpnessTable", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a3, AUTO, "SharpnessFreqTable", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a4, AUTO, "WhiteBalanceTable", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a9, AUTO, "ColorBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00aa, AUTO, "MeasuredColor", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00ae, AUTO, "ColorTemperature", &stdInterpreter}, - {0, AC_NEW , 0, 0, 0x00b0, AUTO, "CanonFlags", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00b1, AUTO, "ModifiedInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00b2, AUTO, "ToneCurveMatching", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00b3, AUTO, "WhiteBalanceMatching", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00b4, AUTO, "ColorSpace", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x00b6, AUTO, "PreviewImageInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00d0, AUTO, "VRDOffset", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00e0, AUTO, "SensorInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x4001, AUTO, "ColorBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x4002, AUTO, "UnknownBlock1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x4003, AUTO, "ColorInfo", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x4005, AUTO, "UnknownBlock2", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x4008, AUTO, "BlackLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a1, AUTO, "ToneCurveTable", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a2, AUTO, "SharpnessTable", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a3, AUTO, "SharpnessFreqTable", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a4, AUTO, "WhiteBalanceTable", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a9, AUTO, "ColorBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00aa, AUTO, "MeasuredColor", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00ae, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_NEW , 0, nullptr, 0x00b0, AUTO, "CanonFlags", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00b1, AUTO, "ModifiedInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00b2, AUTO, "ToneCurveMatching", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00b3, AUTO, "WhiteBalanceMatching", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00b4, AUTO, "ColorSpace", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x00b6, AUTO, "PreviewImageInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00d0, AUTO, "VRDOffset", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00e0, AUTO, "SensorInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x4001, AUTO, "ColorBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x4002, AUTO, "UnknownBlock1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x4003, AUTO, "ColorInfo", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x4005, AUTO, "UnknownBlock2", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x4008, AUTO, "BlackLevel", &stdInterpreter}, {1, AC_WRITE, 0, canonMicroAdjustAttrib, 0x4013, AUTO, "AFMicroAdj", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; } #endif diff --git a/rtexif/fujiattribs.cc b/rtexif/fujiattribs.cc index 311e47ad6..aabd88859 100644 --- a/rtexif/fujiattribs.cc +++ b/rtexif/fujiattribs.cc @@ -268,44 +268,44 @@ FAPictureModeInterpreter faPictureModeInterpreter; const TagAttrib fujiAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "Version", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0010, AUTO, "InternalSerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1000, AUTO, "Quality", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1001, AUTO, "Sharpness", &faSharpnessInterpreter}, - {0, AC_WRITE, 0, 0, 0x1002, AUTO, "WhiteBalance", &faWhiteBalanceInterpreter}, - {0, AC_WRITE, 0, 0, 0x1003, AUTO, "Saturation", &faSaturationInterpreter}, - {0, AC_WRITE, 0, 0, 0x1004, AUTO, "Contrast", &faContrastInterpreter}, - {0, AC_WRITE, 0, 0, 0x1005, AUTO, "ColorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1006, AUTO, "Contrast2", &faContrast2Interpreter}, - {0, AC_WRITE, 0, 0, 0x100a, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100b, AUTO, "NoiseReduction", &faNoiseReductionInterpreter}, - {0, AC_WRITE, 0, 0, 0x1010, AUTO, "FujiFlashMode", &faFlashInterpreter}, - {0, AC_WRITE, 0, 0, 0x1011, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1020, AUTO, "Macro", &faOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1021, AUTO, "FocusMode", &faFocusModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x1023, AUTO, "FocusPixel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1030, AUTO, "SlowSync", &faOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1031, AUTO, "PictureMode", &faPictureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x1100, AUTO, "AutoBracketing", &faOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1101, AUTO, "SequenceNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1210, AUTO, "ColorMode", &faColorModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x1300, AUTO, "BlurWarning", &faOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1301, AUTO, "FocusWarning", &faOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1302, AUTO, "ExposureWarning", &faOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1400, AUTO, "DynamicRange", &faDynamicRangeInterpreter}, - {0, AC_WRITE, 0, 0, 0x1401, AUTO, "FilmMode", &faFilmModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x1402, AUTO, "DynamicRangeSetting", &faDRSettingInterpreter}, - {0, AC_WRITE, 0, 0, 0x1403, AUTO, "DevelopmentDynamicRange", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1404, AUTO, "MinFocalLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1405, AUTO, "MaxFocalLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1406, AUTO, "MaxApertureAtMinFocal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1407, AUTO, "MaxApertureAtMaxFocal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x140b, AUTO, "AutoDynamicRange", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x4100, AUTO, "FacesDetected", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x8000, AUTO, "FileSource", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x8002, AUTO, "OrderNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x8003, AUTO, "FrameNumber", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "Version", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0010, AUTO, "InternalSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1000, AUTO, "Quality", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1001, AUTO, "Sharpness", &faSharpnessInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1002, AUTO, "WhiteBalance", &faWhiteBalanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1003, AUTO, "Saturation", &faSaturationInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1004, AUTO, "Contrast", &faContrastInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1005, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1006, AUTO, "Contrast2", &faContrast2Interpreter}, + {0, AC_WRITE, 0, nullptr, 0x100a, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100b, AUTO, "NoiseReduction", &faNoiseReductionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1010, AUTO, "FujiFlashMode", &faFlashInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1011, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1020, AUTO, "Macro", &faOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1021, AUTO, "FocusMode", &faFocusModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1023, AUTO, "FocusPixel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1030, AUTO, "SlowSync", &faOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1031, AUTO, "PictureMode", &faPictureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1100, AUTO, "AutoBracketing", &faOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1101, AUTO, "SequenceNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1210, AUTO, "ColorMode", &faColorModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1300, AUTO, "BlurWarning", &faOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1301, AUTO, "FocusWarning", &faOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1302, AUTO, "ExposureWarning", &faOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1400, AUTO, "DynamicRange", &faDynamicRangeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1401, AUTO, "FilmMode", &faFilmModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1402, AUTO, "DynamicRangeSetting", &faDRSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1403, AUTO, "DevelopmentDynamicRange", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1404, AUTO, "MinFocalLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1405, AUTO, "MaxFocalLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1406, AUTO, "MaxApertureAtMinFocal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1407, AUTO, "MaxApertureAtMaxFocal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x140b, AUTO, "AutoDynamicRange", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x4100, AUTO, "FacesDetected", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8000, AUTO, "FileSource", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8002, AUTO, "OrderNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8003, AUTO, "FrameNumber", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; } #endif diff --git a/rtexif/kodakattribs.cc b/rtexif/kodakattribs.cc index 678dae114..c92be3a84 100644 --- a/rtexif/kodakattribs.cc +++ b/rtexif/kodakattribs.cc @@ -25,7 +25,7 @@ void parseKodakIfdTextualInfo(Tag *textualInfo, Tag* exif_) char *p = value; char *pc, *plf; - while ((pc = strchr(p, ':')) != NULL && (plf = strchr(pc, '\n')) != NULL) { + while ((pc = strchr(p, ':')) != nullptr && (plf = strchr(pc, '\n')) != nullptr) { while (*p == ' ') { p++; } @@ -98,7 +98,7 @@ void parseKodakIfdTextualInfo(Tag *textualInfo, Tag* exif_) const char *p1 = strchr(val.c_str(), '/'); int a, b; - if (p1 == NULL) { + if (p1 == nullptr) { a = atoi(val.c_str()); b = 1; } else { @@ -135,31 +135,31 @@ void parseKodakIfdTextualInfo(Tag *textualInfo, Tag* exif_) // table not complete, not all proprietary Kodak tags are known const TagAttrib kodakIfdAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0001, AUTO, "UnknownEV?", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0003, AUTO, "ExposureValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03e9, AUTO, "OriginalFileName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03eb, AUTO, "SensorLeftBorder", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03ec, AUTO, "SensorTopBorder", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03ed, AUTO, "SensorImageWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03ee, AUTO, "SensorImageHeight", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03f1, AUTO, "TextualInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03fc, AUTO, "WhiteBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03fd, AUTO, "Processing", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0401, AUTO, "Time", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0414, AUTO, "NCDFileInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0846, AUTO, "ColorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0852, AUTO, "WB_RGBMul0", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0853, AUTO, "WB_RGBMul1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0854, AUTO, "WB_RGBMul2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0855, AUTO, "WB_RGBMul3", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x085c, AUTO, "WB_RGBCoeffs0", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x085d, AUTO, "WB_RGBCoeffs1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x085e, AUTO, "WB_RGBCoeffs2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x085f, AUTO, "WB_RGBCoeffs3", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0ce5, AUTO, "FirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1391, AUTO, "ToneCurveFileName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1784, AUTO, "ISO", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL } + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "UnknownEV?", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "ExposureValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03e9, AUTO, "OriginalFileName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03eb, AUTO, "SensorLeftBorder", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03ec, AUTO, "SensorTopBorder", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03ed, AUTO, "SensorImageWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03ee, AUTO, "SensorImageHeight", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03f1, AUTO, "TextualInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03fc, AUTO, "WhiteBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03fd, AUTO, "Processing", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0401, AUTO, "Time", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0414, AUTO, "NCDFileInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0846, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0852, AUTO, "WB_RGBMul0", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0853, AUTO, "WB_RGBMul1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0854, AUTO, "WB_RGBMul2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0855, AUTO, "WB_RGBMul3", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x085c, AUTO, "WB_RGBCoeffs0", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x085d, AUTO, "WB_RGBCoeffs1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x085e, AUTO, "WB_RGBCoeffs2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x085f, AUTO, "WB_RGBCoeffs3", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0ce5, AUTO, "FirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1391, AUTO, "ToneCurveFileName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1784, AUTO, "ISO", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr } }; } diff --git a/rtexif/nikonattribs.cc b/rtexif/nikonattribs.cc index 38f4ce1f0..9bbeee8ce 100644 --- a/rtexif/nikonattribs.cc +++ b/rtexif/nikonattribs.cc @@ -147,10 +147,10 @@ public: { int a = t->toInt(); std::ostringstream str; - str << "MF = " << (a & 1 ? "Yes" : "No") << std::endl; - str << "D = " << (a & 2 ? "Yes" : "No") << std::endl; - str << "G = " << (a & 4 ? "Yes" : "No") << std::endl; - str << "VR = " << (a & 8 ? "Yes" : "No"); + str << "MF = " << ((a & 1) ? "Yes" : "No") << std::endl; + str << "D = " << ((a & 2) ? "Yes" : "No") << std::endl; + str << "G = " << ((a & 4) ? "Yes" : "No") << std::endl; + str << "VR = " << ((a & 8) ? "Yes" : "No"); return str.str(); } }; @@ -196,13 +196,13 @@ public: { int a = t->toInt(); std::ostringstream str; - str << "Continuous = " << (a & 1 ? "Yes" : "No") << std::endl; - str << "Delay = " << (a & 2 ? "Yes" : "No") << std::endl; - str << "PC Control = " << (a & 4 ? "Yes" : "No") << std::endl; - str << "White-Balance Bracketing = " << (a & 8 ? "Yes" : "No") << std::endl; - str << "Exposure Bracketing = " << (a & 16 ? "Yes" : "No") << std::endl; - str << "Auto ISO = " << (a & 32 ? "Yes" : "No") << std::endl; - str << "IR Control = " << (a & 64 ? "Yes" : "No"); + str << "Continuous = " << ((a & 1) ? "Yes" : "No") << std::endl; + str << "Delay = " << ((a & 2) ? "Yes" : "No") << std::endl; + str << "PC Control = " << ((a & 4) ? "Yes" : "No") << std::endl; + str << "White-Balance Bracketing = " << ((a & 8) ? "Yes" : "No") << std::endl; + str << "Exposure Bracketing = " << ((a & 16) ? "Yes" : "No") << std::endl; + str << "Auto ISO = " << ((a & 32) ? "Yes" : "No") << std::endl; + str << "IR Control = " << ((a & 64) ? "Yes" : "No"); return str.str(); } }; @@ -322,526 +322,9 @@ NAAFInfoInterpreter naAFInfoInterpreter; class NALensDataInterpreter : public Interpreter { - std::map lenses; + static const std::map lenses; + public: - NALensDataInterpreter () - { - /* The key is a composite string made of 8 HEX bytes - * LensIDNumber LensFStops MinFocalLength MaxFocalLength MaxApertureAtMinFocal MaxApertureAtMaxFocal MCUVersion and LensType */ - lenses["00 00 00 00 00 00 00 01"] = "Manual Lens No CPU"; - lenses["00 00 00 00 00 00 E1 12"] = "TC-17E II"; - 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) (A13)"; - lenses["00 3C 1F 37 30 30 00 06"] = "Tokina AT-X 124 AF PRO DX (AF 12-24mm f/4)"; - lenses["00 3C 2B 44 30 30 00 06"] = "Tokina AT-X 17-35 f/4 PRO FX (AF 17-35mm f/4)"; - lenses["00 3C 5C 80 30 30 00 0E"] = "Tokina AT-X 70-200 f/4 FX VCM-S (AF 70-200mm 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 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 (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 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 (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 37 5C 24 24 00 06"] = "Tokina AT-X 24-70 f/2.8 PRO FX (AF 24-70mm f/2.8)"; - lenses["00 48 3C 3C 24 24 00 00"] = "Voigtlander Color Skopar 28mm f/2.8 SL II"; - 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 80 30 30 00 0E"] = "Tokina AT-X 70-200 f/4 FX VCM-S (AF 70-200mm f/4)"; - 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 (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 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* 2/28 ZF.2"; - lenses["00 54 44 44 0C 0C 00 00"] = "Carl Zeiss Distagon T* 1.4/35 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* 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 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 72 72 18 18 00 00"] = "Carl Zeiss Apo Sonnar T* 2/135 ZF.2"; - 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"] = "TC-16A"; - lenses["01 00 00 00 00 00 08 00"] = "TC-16A"; - lenses["01 54 62 62 0C 0C 00 00"] = "Zeiss Otus 1.4/85"; - 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 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 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 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 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 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 (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"; - lenses["0A 48 8E 8E 24 24 05 00"] = "AF Nikkor 300mm f/2.8 IF-ED N"; - lenses["0B 3E 3D 7F 2F 3D 0E 00"] = "Tamron AF 28-200mm f/3.8-5.6 (71D)"; - lenses["0B 3E 3D 7F 2F 3D 0E 02"] = "Tamron AF 28-200mm f/3.8-5.6D (171D)"; - lenses["0B 48 7C 7C 24 24 05 00"] = "AF Nikkor 180mm f/2.8 IF-ED"; - lenses["0D 40 44 72 2C 34 07 00"] = "AF Zoom-Nikkor 35-135mm f/3.5-4.5"; - lenses["0E 48 5C 81 30 30 05 00"] = "AF Zoom-Nikkor 70-210mm f/4"; - lenses["0E 4A 31 48 23 2D 0E 02"] = "Tamron SP AF 20-40mm f/2.7-3.5 (166D)"; - lenses["0F 58 50 50 14 14 05 00"] = "AF Nikkor 50mm f/1.8 N"; - lenses["10 3D 3C 60 2C 3C D2 02"] = "Tamron AF 28-80mm f/3.5-5.6 Aspherical (177D)"; - 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 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 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 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 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 (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"; - lenses["18 40 44 72 2C 34 0E 00"] = "AF Zoom-Nikkor 35-135mm f/3.5-4.5 N"; - lenses["1A 54 44 44 18 18 11 00"] = "AF Nikkor 35mm f/2"; - lenses["1B 44 5E 8E 34 3C 10 00"] = "AF Zoom-Nikkor 75-300mm f/4.5-5.6"; - lenses["1C 48 30 30 24 24 12 00"] = "AF Nikkor 20mm f/2.8"; - lenses["1D 42 44 5C 2A 34 12 00"] = "AF Zoom-Nikkor 35-70mm f/3.3-4.5 N"; - lenses["1E 54 56 56 24 24 13 00"] = "AF Micro-Nikkor 60mm f/2.8"; - lenses["1E 5D 64 64 20 20 13 00"] = "Tamron SP AF 90mm f/2.5 (52E)"; - lenses["1F 54 6A 6A 24 24 14 00"] = "AF Micro-Nikkor 105mm f/2.8"; - lenses["20 3C 80 98 3D 3D 1E 02"] = "Tamron AF 200-400mm f/5.6 LD IF (75D)"; - lenses["20 48 60 80 24 24 15 00"] = "AF Zoom-Nikkor 80-200mm f/2.8 ED"; - lenses["20 5A 64 64 20 20 14 00"] = "Tamron SP AF 90mm f/2.5 Macro (152E)"; - lenses["21 40 3C 5C 2C 34 16 00"] = "AF Zoom-Nikkor 28-70mm f/3.5-4.5"; - lenses["21 56 8E 8E 24 24 14 00"] = "Tamron SP AF 300mm f/2.8 LD-IF (60E)"; - 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 (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 (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 (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"; - lenses["26 3C 5C 8E 30 3C 1C 02"] = "Sigma 70-300mm f/4-5.6 DG Macro"; - 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 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"; - lenses["26 40 2D 80 2C 40 1C 06"] = "Sigma 18-200mm f/3.5-6.3 DC"; - lenses["26 40 37 5C 2C 3C 1C 02"] = "Sigma 24-70mm f/3.5-5.6 Aspherical HF"; - lenses["26 40 3C 5C 2C 34 1C 02"] = "AF Zoom-Nikkor 28-70mm f/3.5-4.5D"; - lenses["26 40 3C 60 2C 3C 1C 02"] = "Sigma 28-80mm f/3.5-5.6 Mini Zoom Macro II Aspherical"; - lenses["26 40 3C 65 2C 3C 1C 02"] = "Sigma 28-90mm f/3.5-5.6 Macro"; - lenses["26 40 3C 80 2B 3C 1C 02"] = "Sigma 28-200mm f/3.5-5.6 Compact Aspherical Hyperzoom Macro"; - lenses["26 40 3C 80 2C 3C 1C 02"] = "Sigma 28-200mm f/3.5-5.6 Compact Aspherical Hyperzoom Macro"; - lenses["26 40 3C 8E 2C 40 1C 02"] = "Sigma 28-300mm f/3.5-6.3 Macro"; - lenses["26 40 7B A0 34 40 1C 02"] = "Sigma APO 170-500mm f/5-6.3 Aspherical RF"; - 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 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"; - 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 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 (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"; - lenses["28 3C A6 A6 30 30 F1 02"] = "AF-I Nikkor 600mm f/4D IF-ED + TC-14E"; - lenses["28 3C A6 A6 30 30 F2 02"] = "AF-I Nikkor 600mm f/4D IF-ED + TC-20E"; - lenses["2A 54 3C 3C 0C 0C 26 02"] = "AF Nikkor 28mm f/1.4D"; - lenses["2B 3C 44 60 30 3C 1F 02"] = "AF Zoom-Nikkor 35-80mm f/4-5.6D"; - lenses["2C 48 6A 6A 18 18 27 02"] = "AF DC-Nikkor 105mm f/2D"; - 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 (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"; - lenses["30 48 98 98 24 24 E1 02"] = "AF-I Nikkor 400mm f/2.8D IF-ED + TC-17E"; - 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 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 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"; - lenses["35 3C A0 A0 30 30 33 02"] = "AF-I Nikkor 500mm f/4D IF-ED"; - lenses["35 3C A0 A0 30 30 E1 02"] = "AF-I Nikkor 500mm f/4D IF-ED + TC-17E"; - lenses["35 3C A0 A0 30 30 F1 02"] = "AF-I Nikkor 500mm f/4D IF-ED + TC-14E"; - lenses["35 3C A0 A0 30 30 F2 02"] = "AF-I Nikkor 500mm f/4D IF-ED + TC-20E"; - lenses["36 48 37 37 24 24 34 02"] = "AF Nikkor 24mm f/2.8D"; - lenses["37 48 30 30 24 24 36 02"] = "AF Nikkor 20mm f/2.8D"; - lenses["38 4C 62 62 14 14 37 02"] = "AF Nikkor 85mm f/1.8D"; - lenses["3A 40 3C 5C 2C 34 39 02"] = "AF Zoom-Nikkor 28-70mm f/3.5-4.5D"; - lenses["3B 48 44 5C 24 24 3A 02"] = "AF Zoom-Nikkor 35-70mm f/2.8D N"; - lenses["3C 48 60 80 24 24 3B 02"] = "AF Zoom-Nikkor 80-200mm f/2.8D ED"; - lenses["3D 3C 44 60 30 3C 3E 02"] = "AF Zoom-Nikkor 35-80mm f/4-5.6D"; - lenses["3E 48 3C 3C 24 24 3D 02"] = "AF Nikkor 28mm f/2.8D"; - lenses["3F 40 44 6A 2C 34 45 02"] = "AF Zoom-Nikkor 35-105mm f/3.5-4.5D"; - lenses["41 48 7C 7C 24 24 43 02"] = "AF Nikkor 180mm f/2.8D IF-ED"; - lenses["42 54 44 44 18 18 44 02"] = "AF Nikkor 35mm f/2D"; - lenses["43 54 50 50 0C 0C 46 02"] = "AF Nikkor 50mm f/1.4D"; - lenses["44 44 60 80 34 3C 47 02"] = "AF Zoom-Nikkor 80-200mm f/4.5-5.6D"; - lenses["45 3D 3C 60 2C 3C 48 02"] = "Tamron AF 28-80mm f/3.5-5.6 Aspherical (177D)"; - lenses["45 40 3C 60 2C 3C 48 02"] = "AF Zoom-Nikkor 28-80mm f/3.5-5.6D"; - 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 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 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 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"; - lenses["48 54 6F 8E 24 24 4B 02"] = "Sigma APO 120-300mm f/2.8 EX DG HSM"; - lenses["48 54 8E 8E 24 24 4B 02"] = "Sigma APO 300mm f/2.8 EX DG HSM"; - lenses["49 3C A6 A6 30 30 4C 02"] = "AF-S Nikkor 600mm f/4D IF-ED"; - lenses["49 3C A6 A6 30 30 E1 02"] = "AF-S Nikkor 600mm f/4D IF-ED + TC-17E"; - 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"; - lenses["4B 3C A0 A0 30 30 4E 02"] = "AF-S Nikkor 500mm f/4D IF-ED"; - lenses["4B 3C A0 A0 30 30 E1 02"] = "AF-S Nikkor 500mm f/4D IF-ED + TC-17E"; - 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)"; - lenses["4E 48 72 72 18 18 51 02"] = "AF DC-Nikkor 135mm f/2D"; - lenses["4F 40 37 5C 2C 3C 53 06"] = "IX-Nikkor 24-70mm f/3.5-5.6"; - lenses["50 48 56 7C 30 3C 54 06"] = "IX-Nikkor 60-180mm f/4-5.6"; - lenses["52 54 44 44 18 18 00 00"] = "Zeiss Milvus 35mm f/2"; - lenses["53 48 60 80 24 24 57 02"] = "AF Zoom-Nikkor 80-200mm f/2.8D ED"; - lenses["53 48 60 80 24 24 60 02"] = "AF Zoom-Nikkor 80-200mm f/2.8D ED"; - lenses["53 54 50 50 0C 0C 00 00"] = "Zeiss Milvus 50mm f/1.4"; - lenses["54 44 5C 7C 34 3C 58 02"] = "AF Zoom-Micro Nikkor 70-180mm f/4.5-5.6D ED"; - lenses["54 44 5C 7C 34 3C 61 02"] = "AF Zoom-Micro Nikkor 70-180mm f/4.5-5.6D ED"; - lenses["54 54 50 50 18 18 00 00"] = "Zeiss Milvus 50mm f/2 Macro"; - lenses["55 54 62 62 0C 0C 00 00"] = "Zeiss Milvus 85mm f/1.4"; - lenses["56 3C 5C 8E 30 3C 1C 02"] = "Sigma 70-300mm f/4-5.6 APO Macro Super II"; - lenses["56 48 5C 8E 30 3C 5A 02"] = "AF Zoom-Nikkor 70-300mm f/4-5.6D ED"; - lenses["56 54 68 68 18 18 00 00"] = "Zeiss Milvus 100mm f/2 Macro"; - lenses["59 48 98 98 24 24 5D 02"] = "AF-S Nikkor 400mm f/2.8D IF-ED"; - lenses["59 48 98 98 24 24 E1 02"] = "AF-S Nikkor 400mm f/2.8D IF-ED + TC-17E"; - lenses["59 48 98 98 24 24 F1 02"] = "AF-S Nikkor 400mm f/2.8D IF-ED + TC-14E"; - lenses["59 48 98 98 24 24 F2 02"] = "AF-S Nikkor 400mm f/2.8D IF-ED + TC-20E"; - lenses["5A 3C 3E 56 30 3C 5E 06"] = "IX-Nikkor 30-60mm f/4-5.6"; - lenses["5B 44 56 7C 34 3C 5F 06"] = "IX-Nikkor 60-180mm f/4.5-5.6"; - lenses["5D 48 3C 5C 24 24 63 02"] = "AF-S Zoom-Nikkor 28-70mm f/2.8D IF-ED"; - lenses["5E 48 60 80 24 24 64 02"] = "AF-S Zoom-Nikkor 80-200mm f/2.8D IF-ED"; - lenses["5F 40 3C 6A 2C 34 65 02"] = "AF Zoom-Nikkor 28-105mm f/3.5-4.5D IF"; - lenses["60 40 3C 60 2C 3C 66 02"] = "AF Zoom-Nikkor 28-80mm f/3.5-5.6D"; - lenses["61 44 5E 86 34 3C 67 02"] = "AF Zoom-Nikkor 75-240mm f/4.5-5.6D"; - lenses["63 48 2B 44 24 24 68 02"] = "AF-S Nikkor 17-35mm f/2.8D IF-ED"; - lenses["64 00 62 62 24 24 6A 02"] = "PC Micro-Nikkor 85mm f/2.8D"; - lenses["65 44 60 98 34 3C 6B 0A"] = "AF VR Zoom-Nikkor 80-400mm f/4.5-5.6D ED"; - lenses["66 40 2D 44 2C 34 6C 02"] = "AF Zoom-Nikkor 18-35mm f/3.5-4.5D IF-ED"; - lenses["67 48 37 62 24 30 6D 02"] = "AF Zoom-Nikkor 24-85mm f/2.8-4D IF"; - 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 (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"; - lenses["6D 48 8E 8E 24 24 73 02"] = "AF-S Nikkor 300mm f/2.8D IF-ED II"; - lenses["6E 48 98 98 24 24 74 02"] = "AF-S Nikkor 400mm f/2.8D IF-ED II"; - lenses["6F 3C A0 A0 30 30 75 02"] = "AF-S Nikkor 500mm f/4D IF-ED II"; - lenses["70 3C A6 A6 30 30 76 02"] = "AF-S Nikkor 600mm f/4D IF-ED II"; - lenses["72 48 4C 4C 24 24 77 00"] = "Nikkor 45mm f/2.8 P"; - lenses["74 40 37 62 2C 34 78 06"] = "AF-S Zoom-Nikkor 24-85mm f/3.5-4.5G IF-ED"; - lenses["75 40 3C 68 2C 3C 79 06"] = "AF Zoom-Nikkor 28-100mm f/3.5-5.6G"; - lenses["76 58 50 50 14 14 7A 02"] = "AF Nikkor 50mm f/1.8D"; - lenses["77 44 61 98 34 3C 7B 0E"] = "Sigma 80-400mm f/4.5-5.6 EX OS"; - lenses["77 48 5C 80 24 24 7B 0E"] = "AF-S VR Zoom-Nikkor 70-200mm f/2.8G IF-ED"; - 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 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 1C 30 24 24 7E 06"] = "Tokina AT-X 11-20 f/2.8 PRO DX (AF 11-20mm 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"; - lenses["7A 54 6E 8E 24 24 4B 02"] = "Sigma APO 120-300mm f/2.8 EX DG HSM"; - lenses["7B 48 80 98 30 30 80 0E"] = "AF-S VR Zoom-Nikkor 200-400mm f/4G IF-ED"; - lenses["7D 48 2B 53 24 24 82 06"] = "AF-S DX Zoom-Nikkor 17-55mm f/2.8G IF-ED"; - lenses["7F 40 2D 5C 2C 34 84 06"] = "AF-S DX Zoom-Nikkor 18-70mm f/3.5-4.5G IF-ED"; - 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 34 76 A6 38 40 4B 0E"] = "Sigma 150-600mm f/5-6.3 DG OS HSM | C"; - 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["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 | C"; - 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["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"; - lenses["94 40 2D 53 2C 3C 96 06"] = "AF-S DX Zoom-Nikkor 18-55mm f/3.5-5.6G ED II"; - lenses["95 00 37 37 2C 2C 97 06"] = "PC-E Nikkor 24mm f/3.5D ED"; - lenses["95 4C 37 37 2C 2C 97 02"] = "PC-E Nikkor 24mm f/3.5D ED"; - 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"; - lenses["9B 54 62 62 0C 0C 4B 06"] = "Sigma 85mm f/1.4 EX DG HSM"; - lenses["9C 48 5C 80 24 24 4B 0E"] = "Sigma 70-200mm f/2.8 EX DG OS HSM"; - lenses["9C 54 56 56 24 24 9E 06"] = "AF-S Micro Nikkor 60mm f/2.8G ED"; - lenses["9D 00 62 62 24 24 9F 06"] = "PC-E Micro Nikkor 85mm f/2.8D"; - lenses["9D 48 2B 50 24 24 4B 0E"] = "Sigma 17-50mm f/2.8 EX DC OS HSM"; - lenses["9D 54 62 62 24 24 9F 02"] = "PC-E Micro Nikkor 85mm f/2.8D"; - lenses["9E 38 11 29 34 3C 4B 06"] = "Sigma 8-16mm f/4.5-5.6 DC HSM"; - 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["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 Nikkor 18-55mm f/3.5-5.6G VR 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 ED"; - 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["A6 48 98 98 24 24 C1 0E"] = "AF-S Nikkor 400mm f/2.8E FL ED VR"; - 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["AB 3C A0 A0 30 30 C6 4E"] = "AF-S Nikkor 500mm f/4E FL 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["AC 3C A6 A6 30 30 C7 4E"] = "AF-S Nikkor 600mm f/4E FL 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["AD 48 28 60 24 30 C8 0E"] = "AF-S DX Nikkor 16-80mm f/2.8-4E ED VR"; - lenses["AD 48 28 60 24 30 C8 4E"] = "AF-S DX Nikkor 16-80mm f/2.8-4E ED VR"; - lenses["AE 3C 80 A0 3C 3C C9 0E"] = "AF-S Nikkor 200-500mm f/5.6E ED VR"; - lenses["AE 3C 80 A0 3C 3C C9 4E"] = "AF-S Nikkor 200-500mm f/5.6E ED VR"; - lenses["AE 54 62 62 0C 0C B0 06"] = "AF-S Nikkor 85mm f/1.4G"; - lenses["AF 4C 37 37 14 14 CC 06"] = "AF-S Nikkor 24mm f/1.8G ED"; - 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"; - lenses["B1 48 48 48 24 24 B3 06"] = "AF-S DX Micro Nikkor 40mm f/2.8G"; - lenses["B2 48 5C 80 30 30 B4 0E"] = "AF-S Nikkor 70-200mm f/4G ED VR"; - lenses["B3 4C 62 62 14 14 B5 06"] = "AF-S Nikkor 85mm f/1.8G"; - lenses["B4 40 37 62 2C 34 B6 0E"] = "AF-S VR Zoom-Nikkor 24-85mm f/3.5-4.5G IF-ED"; - lenses["B5 4C 3C 3C 14 14 B7 06"] = "AF-S Nikkor 28mm f/1.8G"; - lenses["B6 3C B0 B0 3C 3C B8 0E"] = "AF-S VR Nikkor 800mm f/5.6E FL ED"; - lenses["B6 48 37 56 24 24 1C 02"] = "Sigma 24-60mm f/2.8 EX DG"; - lenses["B7 44 60 98 34 3C B9 0E"] = "AF-S Nikkor 80-400mm f/4.5-5.6G ED VR"; - lenses["B8 40 2D 44 2C 34 BA 06"] = "AF-S Nikkor 18-35mm f/3.5-4.5G ED"; - lenses["CC 4C 50 68 14 14 4B 06"] = "Sigma 50-100mm f/1.8 DC HSM | A"; - lenses["CD 3D 2D 70 2E 3C 4B 0E"] = "Sigma 18-125mm f/3.8-5.6 DC OS HSM"; - lenses["CE 34 76 A0 38 40 4B 0E"] = "Sigma 150-500mm f/5-6.3 DG OS APO HSM"; - 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["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 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["E8 4C 44 44 14 14 DF 0E"] = "Tamron SP 35mm f/1.8 VC"; - 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"; - lenses["F0 3F 2D 8A 2C 40 DF 0E"] = "Tamron AF 18-270mm f/3.5-6.3 Di II VC PZD (B008)"; - lenses["F1 44 A0 A0 34 34 4B 02"] = "Sigma APO 500mm f/4.5 EX DG HSM"; - lenses["F1 47 5C 8E 30 3C DF 0E"] = "Tamron SP 70-300mm f/4-5.6 Di VC USD (A005)"; - lenses["F3 48 68 8E 30 30 4B 02"] = "Sigma APO 100-300mm f/4 EX IF HSM"; - 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 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)"; - lenses["F8 54 3E 3E 0C 0C 4B 06"] = "Sigma 30mm f/1.4 EX DC HSM"; - lenses["F8 54 64 64 24 24 DF 06"] = "Tamron SP AF 90mm f/2.8 Di Macro 1:1 (272NII)"; - lenses["F8 55 64 64 24 24 84 06"] = "Tamron SP AF 90mm f/2.8 Di Macro 1:1 (272NII)"; - 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 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 (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 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) { @@ -1066,7 +549,7 @@ public: lid << std::setw(2) << std::setfill('0') << lenstype; - std::map::iterator r = lenses.find (lid.str()); + std::map::const_iterator r = lenses.find (lid.str()); if (r != lenses.end()) { if(r == lenses.begin() && EffectiveMaxApertureString != "") { // first entry is for unchipped lenses @@ -1083,101 +566,618 @@ public: }; NALensDataInterpreter naLensDataInterpreter; +const std::map NALensDataInterpreter::lenses = { + // The key is a composite string made of 8 HEX bytes + // LensIDNumber LensFStops MinFocalLength MaxFocalLength MaxApertureAtMinFocal MaxApertureAtMaxFocal MCUVersion and LensType + {"00 00 00 00 00 00 00 01", "Manual Lens No CPU"}, + {"00 00 00 00 00 00 E1 12", "TC-17E II"}, + {"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"}, + {"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"}, + {"00 00 48 48 53 53 00 01", "Loreo 40mm f/11-22 3D Lens in a Cap 9005"}, + {"00 36 1C 2D 34 3C 00 06", "Tamron SP AF 11-18mm f/4.5-5.6 Di II LD Aspherical (IF) (A13)"}, + {"00 3C 1F 37 30 30 00 06", "Tokina AT-X 124 AF PRO DX (AF 12-24mm f/4)"}, + {"00 3C 2B 44 30 30 00 06", "Tokina AT-X 17-35 f/4 PRO FX (AF 17-35mm f/4)"}, + {"00 3C 5C 80 30 30 00 0E", "Tokina AT-X 70-200 f/4 FX VCM-S (AF 70-200mm f/4)"}, + {"00 3E 80 A0 38 3F 00 02", "Tamron SP AF 200-500mm f/5-6.3 Di LD (IF) (A08)"}, + {"00 3F 2D 80 2B 40 00 06", "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical (IF) (A14)"}, + {"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)"}, + {"00 3F 80 A0 38 3F 00 02", "Tamron SP AF 200-500mm f/5-6.3 Di (A08)"}, + {"00 40 11 11 2C 2C 00 00", "Samyang 8mm f/3.5 Fish-Eye"}, + {"00 40 18 2B 2C 34 00 06", "Tokina AT-X 107 AF DX Fisheye (AF 10-17mm f/3.5-4.5)"}, + {"00 40 2A 72 2C 3C 00 06", "Tokina AT-X 16.5-135 DX (AF 16.5-135mm f/3.5-5.6)"}, + {"00 40 2B 2B 2C 2C 00 02", "Tokina AT-X 17 AF PRO (AF 17mm f/3.5)"}, + {"00 40 2D 2D 2C 2C 00 00", "Carl Zeiss Distagon T* 3.5/18 ZF.2"}, + {"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)"}, + {"00 40 2D 88 2C 40 00 06", "Tamron AF 18-250mm f/3.5-6.3 Di II LD Aspherical (IF) Macro (A18NII)"}, + {"00 40 2D 88 2C 40 62 06", "Tamron AF 18-250mm f/3.5-6.3 Di II LD Aspherical (IF) Macro (A18)"}, + {"00 40 31 31 2C 2C 00 00", "Voigtlander Color Skopar 20mm f/3.5 SLII Aspherical"}, + {"00 40 37 80 2C 3C 00 02", "Tokina AT-X 242 AF (AF 24-200mm f/3.5-5.6)"}, + {"00 40 64 64 2C 2C 00 00", "Voigtlander APO-Lanthar 90mm f/3.5 SLII Close Focus"}, + {"00 44 60 98 34 3C 00 02", "Tokina AT-X 840 D (AF 80-400mm f/4.5-5.6)"}, + {"00 47 10 10 24 24 00 00", "Fisheye Nikkor 8mm f/2.8 AiS"}, + {"00 47 25 25 24 24 00 02", "Tamron SP AF 14mm f/2.8 Aspherical (IF) (69E)"}, + {"00 47 3C 3C 24 24 00 00", "Nikkor 28mm f/2.8 AiS"}, + {"00 47 44 44 24 24 00 06", "Tokina AT-X M35 PRO DX (AF 35mm f/2.8 Macro)"}, + {"00 47 53 80 30 3C 00 06", "Tamron AF 55-200mm f/4-5.6 Di II LD (A15)"}, + {"00 48 1C 29 24 24 00 06", "Tokina AT-X 116 PRO DX (AF 11-16mm f/2.8)"}, + {"00 48 29 3C 24 24 00 06", "Tokina AT-X 16-28 AF PRO FX (AF 16-28mm f/2.8)"}, + {"00 48 29 50 24 24 00 06", "Tokina AT-X 165 PRO DX (AF 16-50mm f/2.8)"}, + {"00 48 32 32 24 24 00 00", "Carl Zeiss Distagon T* 2.8/21 ZF.2"}, + {"00 48 37 5C 24 24 00 06", "Tokina AT-X 24-70 f/2.8 PRO FX (AF 24-70mm f/2.8)"}, + {"00 48 3C 3C 24 24 00 00", "Voigtlander Color Skopar 28mm f/2.8 SL II"}, + {"00 48 3C 60 24 24 00 02", "Tokina AT-X 280 AF PRO (AF 28-80mm f/2.8)"}, + {"00 48 3C 6A 24 24 00 02", "Tamron SP AF 28-105mm f/2.8 LD Aspherical IF (176D)"}, + {"00 48 50 50 18 18 00 00", "Nikkor H 50mm f/2"}, + {"00 48 50 72 24 24 00 06", "Tokina AT-X 535 PRO DX (AF 50-135mm f/2.8)"}, + {"00 48 5C 80 30 30 00 0E", "Tokina AT-X 70-200 f/4 FX VCM-S (AF 70-200mm f/4)"}, + {"00 48 5C 8E 30 3C 00 06", "Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2 (A17NII)"}, + {"00 48 68 68 24 24 00 00", "Series E 100mm f/2.8"}, + {"00 48 80 80 30 30 00 00", "Nikkor 200mm f/4 AiS"}, + {"00 49 30 48 22 2B 00 02", "Tamron SP AF 20-40mm f/2.7-3.5 (166D)"}, + {"00 4C 6A 6A 20 20 00 00", "Nikkor 105mm f/2.5 AiS"}, + {"00 4C 7C 7C 2C 2C 00 02", "Tamron SP AF 180mm f/3.5 Di Model (B01)"}, + {"00 53 2B 50 24 24 00 06", "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16)"}, + {"00 54 2B 50 24 24 00 06", "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16NII)"}, + {"00 54 3C 3C 18 18 00 00", "Carl Zeiss Distagon T* 2/28 ZF.2"}, + {"00 54 44 44 0C 0C 00 00", "Carl Zeiss Distagon T* 1.4/35 ZF.2"}, + {"00 54 44 44 18 18 00 00", "Carl Zeiss Distagon T* 2/35 ZF.2"}, + {"00 54 48 48 18 18 00 00", "Voigtlander Ultron 40mm f/2 SLII Aspherical"}, + {"00 54 50 50 0C 0C 00 00", "Carl Zeiss Planar T* 1.4/50 ZF.2"}, + {"00 54 50 50 18 18 00 00", "Carl Zeiss Makro-Planar T* 2/50 ZF.2"}, + {"00 54 53 53 0C 0C 00 00", "Zeiss Otus 1.4/55"}, + {"00 54 55 55 0C 0C 00 00", "Voigtlander Nokton 58mm f/1.4 SLII"}, + {"00 54 56 56 30 30 00 00", "Coastal Optical Systems 60mm 1:4 UV-VIS-IR Macro Apo"}, + {"00 54 62 62 0C 0C 00 00", "Carl Zeiss Planar T* 1.4/85 ZF.2"}, + {"00 54 68 68 18 18 00 00", "Carl Zeiss Makro-Planar T* 2/100 ZF.2"}, + {"00 54 68 68 24 24 00 02", "Tokina AT-X M100 AF PRO D (AF 100mm f/2.8 Macro)"}, + {"00 54 72 72 18 18 00 00", "Carl Zeiss Apo Sonnar T* 2/135 ZF.2"}, + {"00 54 8E 8E 24 24 00 02", "Tokina AT-X 300 AF PRO (AF 300mm f/2.8)"}, + {"00 57 50 50 14 14 00 00", "Nikkor 50mm f/1.8 AI"}, + {"00 58 64 64 20 20 00 00", "Soligor C/D Macro MC 90mm f/2.5"}, + {"01 00 00 00 00 00 02 00", "TC-16A"}, + {"01 00 00 00 00 00 08 00", "TC-16A"}, + {"01 54 62 62 0C 0C 00 00", "Zeiss Otus 1.4/85"}, + {"01 58 50 50 14 14 02 00", "AF Nikkor 50mm f/1.8"}, + {"01 58 50 50 14 14 05 00", "AF Nikkor 50mm f/1.8"}, + {"02 2F 98 98 3D 3D 02 00", "Sigma APO 400mm f/5.6"}, + {"02 34 A0 A0 44 44 02 00", "Sigma APO 500mm f/7.2"}, + {"02 37 5E 8E 35 3D 02 00", "Sigma 75-300mm f/4.5-5.6 APO"}, + {"02 37 A0 A0 34 34 02 00", "Sigma APO 500mm f/4.5"}, + {"02 3A 37 50 31 3D 02 00", "Sigma 24-50mm f/4-5.6 UC"}, + {"02 3A 5E 8E 32 3D 02 00", "Sigma 75-300mm f/4.0-5.6"}, + {"02 3B 44 61 30 3D 02 00", "Sigma 35-80mm f/4-5.6"}, + {"02 3C B0 B0 3C 3C 02 00", "Sigma APO 800mm f/5.6"}, + {"02 3F 24 24 2C 2C 02 00", "Sigma 14mm f/3.5"}, + {"02 3F 3C 5C 2D 35 02 00", "Sigma 28-70mm f/3.5-4.5 UC"}, + {"02 40 44 5C 2C 34 02 00", "Exakta AF 35-70mm 1:3.5-4.5 MC"}, + {"02 40 44 73 2B 36 02 00", "Sigma 35-135mm f/3.5-4.5 a"}, + {"02 40 5C 82 2C 35 02 00", "Sigma APO 70-210mm f/3.5-4.5"}, + {"02 42 44 5C 2A 34 02 00", "AF Zoom-Nikkor 35-70mm f/3.3-4.5"}, + {"02 42 44 5C 2A 34 08 00", "AF Zoom-Nikkor 35-70mm f/3.3-4.5"}, + {"02 46 37 37 25 25 02 00", "Sigma 24mm f/2.8 Super Wide II Macro"}, + {"02 46 3C 5C 25 25 02 00", "Sigma 28-70mm f/2.8"}, + {"02 46 5C 82 25 25 02 00", "Sigma 70-210mm f/2.8 APO"}, + {"02 48 50 50 24 24 02 00", "Sigma Macro 50mm f/2.8"}, + {"02 48 65 65 24 24 02 00", "Sigma Macro 90mm f/2.8"}, + {"03 43 5C 81 35 35 02 00", "Soligor AF C/D Zoom UMCS 70-210mm 1:4.5"}, + {"03 48 5C 81 30 30 02 00", "AF Zoom-Nikkor 70-210mm f/4"}, + {"04 48 3C 3C 24 24 03 00", "AF Nikkor 28mm f/2.8"}, + {"05 54 50 50 0C 0C 04 00", "AF Nikkor 50mm f/1.4"}, + {"06 3F 68 68 2C 2C 06 00", "Cosina AF 100mm f/3.5 Macro"}, + {"06 54 53 53 24 24 06 00", "AF Micro-Nikkor 55mm f/2.8"}, + {"07 36 3D 5F 2C 3C 03 00", "Cosina AF Zoom 28-80mm f/3.5-5.6 MC Macro"}, + {"07 3E 30 43 2D 35 03 00", "Soligor AF Zoom 19-35mm 1:3.5-4.5 MC"}, + {"07 40 2F 44 2C 34 03 02", "Tamron AF 19-35mm f/3.5-4.5 (A10)"}, + {"07 40 30 45 2D 35 03 02", "Tamron AF 19-35mm f/3.5-4.5 (A10)"}, + {"07 40 3C 5C 2C 35 03 00", "Tokina AF 270 II (AF 28-70mm f/3.5-4.5)"}, + {"07 40 3C 62 2C 34 03 00", "AF Zoom-Nikkor 28-85mm f/3.5-4.5"}, + {"07 46 2B 44 24 30 03 02", "Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical (IF) (A05)"}, + {"07 46 3D 6A 25 2F 03 00", "Cosina AF Zoom 28-105mm f/2.8-3.8 MC"}, + {"07 47 3C 5C 25 35 03 00", "Tokina AF 287 SD (AF 28-70mm f/2.8-4.5)"}, + {"07 48 3C 5C 24 24 03 00", "Tokina AT-X 287 AF (AF 28-70mm f/2.8)"}, + {"08 40 44 6A 2C 34 04 00", "AF Zoom-Nikkor 35-105mm f/3.5-4.5"}, + {"09 48 37 37 24 24 04 00", "AF Nikkor 24mm f/2.8"}, + {"0A 48 8E 8E 24 24 03 00", "AF Nikkor 300mm f/2.8 IF-ED"}, + {"0A 48 8E 8E 24 24 05 00", "AF Nikkor 300mm f/2.8 IF-ED N"}, + {"0B 3E 3D 7F 2F 3D 0E 00", "Tamron AF 28-200mm f/3.8-5.6 (71D)"}, + {"0B 3E 3D 7F 2F 3D 0E 02", "Tamron AF 28-200mm f/3.8-5.6D (171D)"}, + {"0B 48 7C 7C 24 24 05 00", "AF Nikkor 180mm f/2.8 IF-ED"}, + {"0D 40 44 72 2C 34 07 00", "AF Zoom-Nikkor 35-135mm f/3.5-4.5"}, + {"0E 48 5C 81 30 30 05 00", "AF Zoom-Nikkor 70-210mm f/4"}, + {"0E 4A 31 48 23 2D 0E 02", "Tamron SP AF 20-40mm f/2.7-3.5 (166D)"}, + {"0F 58 50 50 14 14 05 00", "AF Nikkor 50mm f/1.8 N"}, + {"10 3D 3C 60 2C 3C D2 02", "Tamron AF 28-80mm f/3.5-5.6 Aspherical (177D)"}, + {"10 48 8E 8E 30 30 08 00", "AF Nikkor 300mm f/4 IF-ED"}, + {"11 48 44 5C 24 24 08 00", "AF Zoom-Nikkor 35-70mm f/2.8"}, + {"12 36 5C 81 35 3D 09 00", "Cosina AF Zoom 70-210mm f/4.5-5.6 MC Macro"}, + {"12 36 69 97 35 42 09 00", "Soligor AF Zoom 100-400mm 1:4.5-6.7 MC"}, + {"12 38 69 97 35 42 09 02", "Promaster Spectrum 7 100-400mm f/4.5-6.7"}, + {"12 39 5C 8E 34 3D 08 02", "Cosina AF Zoom 70-300mm f/4.5-5.6 MC Macro"}, + {"12 3B 68 8D 3D 43 09 02", "Cosina AF Zoom 100-300mm f/5.6-6.7 MC Macro"}, + {"12 3B 98 98 3D 3D 09 00", "Tokina AT-X 400 AF SD (AF 400mm f/5.6)"}, + {"12 3D 3C 80 2E 3C DF 02", "Tamron AF 28-200mm f/3.8-5.6 AF Aspherical LD (IF) (271D)"}, + {"12 44 5E 8E 34 3C 09 00", "Tokina AF 730 (AF 75-300mm f/4.5-5.6)"}, + {"12 48 5C 81 30 3C 09 00", "AF Nikkor 70-210mm f/4-5.6"}, + {"12 4A 5C 81 31 3D 09 00", "Soligor AF C/D Auto Zoom+Macro 70-210mm 1:4-5.6 UMCS"}, + {"13 42 37 50 2A 34 0B 00", "AF Zoom-Nikkor 24-50mm f/3.3-4.5"}, + {"14 48 60 80 24 24 0B 00", "AF Zoom-Nikkor 80-200mm f/2.8 ED"}, + {"14 48 68 8E 30 30 0B 00", "Tokina AT-X 340 AF (AF 100-300mm f/4)"}, + {"14 54 60 80 24 24 0B 00", "Tokina AT-X 828 AF (AF 80-200mm f/2.8)"}, + {"15 4C 62 62 14 14 0C 00", "AF Nikkor 85mm f/1.8"}, + {"17 3C A0 A0 30 30 0F 00", "Nikkor 500mm f/4 P ED IF"}, + {"17 3C A0 A0 30 30 11 00", "Nikkor 500mm f/4 P ED IF"}, + {"18 40 44 72 2C 34 0E 00", "AF Zoom-Nikkor 35-135mm f/3.5-4.5 N"}, + {"1A 54 44 44 18 18 11 00", "AF Nikkor 35mm f/2"}, + {"1B 44 5E 8E 34 3C 10 00", "AF Zoom-Nikkor 75-300mm f/4.5-5.6"}, + {"1C 48 30 30 24 24 12 00", "AF Nikkor 20mm f/2.8"}, + {"1D 42 44 5C 2A 34 12 00", "AF Zoom-Nikkor 35-70mm f/3.3-4.5 N"}, + {"1E 54 56 56 24 24 13 00", "AF Micro-Nikkor 60mm f/2.8"}, + {"1E 5D 64 64 20 20 13 00", "Tamron SP AF 90mm f/2.5 (52E)"}, + {"1F 54 6A 6A 24 24 14 00", "AF Micro-Nikkor 105mm f/2.8"}, + {"20 3C 80 98 3D 3D 1E 02", "Tamron AF 200-400mm f/5.6 LD IF (75D)"}, + {"20 48 60 80 24 24 15 00", "AF Zoom-Nikkor 80-200mm f/2.8 ED"}, + {"20 5A 64 64 20 20 14 00", "Tamron SP AF 90mm f/2.5 Macro (152E)"}, + {"21 40 3C 5C 2C 34 16 00", "AF Zoom-Nikkor 28-70mm f/3.5-4.5"}, + {"21 56 8E 8E 24 24 14 00", "Tamron SP AF 300mm f/2.8 LD-IF (60E)"}, + {"22 48 72 72 18 18 16 00", "AF DC-Nikkor 135mm f/2"}, + {"22 53 64 64 24 24 E0 02", "Tamron SP AF 90mm f/2.8 Macro 1:1 (72E)"}, + {"23 30 BE CA 3C 48 17 00", "Zoom-Nikkor 1200-1700mm f/5.6-8 P ED IF"}, + {"24 44 60 98 34 3C 1A 02", "Tokina AT-X 840 AF-II (AF 80-400mm f/4.5-5.6)"}, + {"24 48 60 80 24 24 1A 02", "AF Zoom-Nikkor 80-200mm f/2.8D ED"}, + {"24 54 60 80 24 24 1A 02", "Tokina AT-X 828 AF PRO (AF 80-200mm f/2.8)"}, + {"25 44 44 8E 34 42 1B 02", "Tokina AF 353 (AF 35-300mm f/4.5-6.7)"}, + {"25 48 3C 5C 24 24 1B 02", "Tokina AT-X 270 AF PRO II (AF 28-70mm f/2.6-2.8)"}, + {"25 48 3C 5C 24 24 1B 02", "Tokina AT-X 287 AF PRO SV (AF 28-70mm f/2.8)"}, + {"25 48 44 5C 24 24 1B 02", "AF Zoom-Nikkor 35-70mm f/2.8D"}, + {"25 48 44 5C 24 24 3A 02", "AF Zoom-Nikkor 35-70mm f/2.8D"}, + {"25 48 44 5C 24 24 52 02", "AF Zoom-Nikkor 35-70mm f/2.8D"}, + {"26 3C 54 80 30 3C 1C 06", "Sigma 55-200mm f/4-5.6 DC"}, + {"26 3C 5C 82 30 3C 1C 02", "Sigma 70-210mm f/4-5.6 UC-II"}, + {"26 3C 5C 8E 30 3C 1C 02", "Sigma 70-300mm f/4-5.6 DG Macro"}, + {"26 3C 98 98 3C 3C 1C 02", "Sigma APO Tele Macro 400mm f/5.6"}, + {"26 3D 3C 80 2F 3D 1C 02", "Sigma 28-300mm f/3.8-5.6 Aspherical"}, + {"26 3E 3C 6A 2E 3C 1C 02", "Sigma 28-105mm f/3.8-5.6 UC-III Aspherical IF"}, + {"26 40 27 3F 2C 34 1C 02", "Sigma 15-30mm f/3.5-4.5 EX DG Aspherical DF"}, + {"26 40 2D 44 2B 34 1C 02", "Sigma 18-35mm f/3.5-4.5 Aspherical"}, + {"26 40 2D 50 2C 3C 1C 06", "Sigma 18-50mm f/3.5-5.6 DC"}, + {"26 40 2D 70 2B 3C 1C 06", "Sigma 18-125mm f/3.5-5.6 DC"}, + {"26 40 2D 80 2C 40 1C 06", "Sigma 18-200mm f/3.5-6.3 DC"}, + {"26 40 37 5C 2C 3C 1C 02", "Sigma 24-70mm f/3.5-5.6 Aspherical HF"}, + {"26 40 3C 5C 2C 34 1C 02", "AF Zoom-Nikkor 28-70mm f/3.5-4.5D"}, + {"26 40 3C 60 2C 3C 1C 02", "Sigma 28-80mm f/3.5-5.6 Mini Zoom Macro II Aspherical"}, + {"26 40 3C 65 2C 3C 1C 02", "Sigma 28-90mm f/3.5-5.6 Macro"}, + {"26 40 3C 80 2B 3C 1C 02", "Sigma 28-200mm f/3.5-5.6 Compact Aspherical Hyperzoom Macro"}, + {"26 40 3C 80 2C 3C 1C 02", "Sigma 28-200mm f/3.5-5.6 Compact Aspherical Hyperzoom Macro"}, + {"26 40 3C 8E 2C 40 1C 02", "Sigma 28-300mm f/3.5-6.3 Macro"}, + {"26 40 7B A0 34 40 1C 02", "Sigma APO 170-500mm f/5-6.3 Aspherical RF"}, + {"26 41 3C 8E 2C 40 1C 02", "Sigma 28-300mm f/3.5-6.3 DG Macro"}, + {"26 44 73 98 34 3C 1C 02", "Sigma 135-400mm f/4.5-5.6 APO Aspherical"}, + {"26 48 11 11 30 30 1C 02", "Sigma 8mm f/4 EX Circular Fisheye"}, + {"26 48 27 27 24 24 1C 02", "Sigma 15mm f/2.8 EX Diagonal Fisheye"}, + {"26 48 2D 50 24 24 1C 06", "Sigma 18-50mm f/2.8 EX DC"}, + {"26 48 31 49 24 24 1C 02", "Sigma 20-40mm f/2.8"}, + {"26 48 37 56 24 24 1C 02", "Sigma 24-60mm f/2.8 EX DG"}, + {"26 48 3C 5C 24 24 1C 06", "Sigma 28-70mm f/2.8 EX DG"}, + {"26 48 3C 5C 24 30 1C 02", "Sigma 28-70mm f/2.8-4 DG"}, + {"26 48 3C 6A 24 30 1C 02", "Sigma 28-105mm f/2.8-4 Aspherical"}, + {"26 48 8E 8E 30 30 1C 02", "Sigma APO Tele Macro 300mm f/4"}, + {"26 54 2B 44 24 30 1C 02", "Sigma 17-35mm f/2.8-4 EX Aspherical"}, + {"26 54 37 5C 24 24 1C 02", "Sigma 24-70mm f/2.8 EX DG Macro"}, + {"26 54 37 73 24 34 1C 02", "Sigma 24-135mm f/2.8-4.5"}, + {"26 54 3C 5C 24 24 1C 02", "Sigma 28-70mm f/2.8 EX"}, + {"26 58 31 31 14 14 1C 02", "Sigma 20mm f/1.8 EX DG Aspherical RF"}, + {"26 58 37 37 14 14 1C 02", "Sigma 24mm f/1.8 EX DG Aspherical Macro"}, + {"26 58 3C 3C 14 14 1C 02", "Sigma 28mm f/1.8 EX DG Aspherical Macro"}, + {"27 48 8E 8E 24 24 1D 02", "AF-I Nikkor 300mm f/2.8D IF-ED"}, + {"27 48 8E 8E 24 24 E1 02", "AF-I Nikkor 300mm f/2.8D IF-ED + TC-17E"}, + {"27 48 8E 8E 24 24 F1 02", "AF-I Nikkor 300mm f/2.8D IF-ED + TC-14E"}, + {"27 48 8E 8E 24 24 F2 02", "AF-I Nikkor 300mm f/2.8D IF-ED + TC-20E"}, + {"27 48 8E 8E 30 30 1D 02", "Tokina AT-X 304 AF (AF 300mm f/4.0)"}, + {"27 54 8E 8E 24 24 1D 02", "Tamron SP AF 300mm f/2.8 LD-IF (360E)"}, + {"28 3C A6 A6 30 30 1D 02", "AF-I Nikkor 600mm f/4D IF-ED"}, + {"28 3C A6 A6 30 30 E1 02", "AF-I Nikkor 600mm f/4D IF-ED + TC-17E"}, + {"28 3C A6 A6 30 30 F1 02", "AF-I Nikkor 600mm f/4D IF-ED + TC-14E"}, + {"28 3C A6 A6 30 30 F2 02", "AF-I Nikkor 600mm f/4D IF-ED + TC-20E"}, + {"2A 54 3C 3C 0C 0C 26 02", "AF Nikkor 28mm f/1.4D"}, + {"2B 3C 44 60 30 3C 1F 02", "AF Zoom-Nikkor 35-80mm f/4-5.6D"}, + {"2C 48 6A 6A 18 18 27 02", "AF DC-Nikkor 105mm f/2D"}, + {"2D 48 80 80 30 30 21 02", "AF Micro-Nikkor 200mm f/4D IF-ED"}, + {"2E 48 5C 82 30 3C 22 02", "AF Nikkor 70-210mm f/4-5.6D"}, + {"2E 48 5C 82 30 3C 28 02", "AF Nikkor 70-210mm f/4-5.6D"}, + {"2F 40 30 44 2C 34 29 02", "Tokina AF 235 II (AF 20-35mm f/3.5-4.5)"}, + {"2F 40 30 44 2C 34 29 02", "Tokina AF 193 (AF 19-35mm f/3.5-4.5)"}, + {"2F 48 30 44 24 24 29 02", "AF Zoom-Nikkor 20-35mm f/2.8D IF"}, + {"2F 48 30 44 24 24 29 02", "Tokina AT-X 235 AF PRO (AF 20-35mm f/2.8)"}, + {"30 48 98 98 24 24 24 02", "AF-I Nikkor 400mm f/2.8D IF-ED"}, + {"30 48 98 98 24 24 E1 02", "AF-I Nikkor 400mm f/2.8D IF-ED + TC-17E"}, + {"30 48 98 98 24 24 F1 02", "AF-I Nikkor 400mm f/2.8D IF-ED + TC-14E"}, + {"30 48 98 98 24 24 F2 02", "AF-I Nikkor 400mm f/2.8D IF-ED + TC-20E"}, + {"31 54 56 56 24 24 25 02", "AF Micro-Nikkor 60mm f/2.8D"}, + {"32 53 64 64 24 24 35 02", "Tamron SP AF 90mm f/2.8 [Di] Macro 1:1 (172E/272E)"}, + {"32 54 50 50 24 24 35 02", "Sigma Macro 50mm f/2.8 EX DG"}, + {"32 54 6A 6A 24 24 35 02", "AF Micro-Nikkor 105mm f/2.8D"}, + {"32 54 6A 6A 24 24 35 02", "Sigma Macro 105mm f/2.8 EX DG"}, + {"33 48 2D 2D 24 24 31 02", "AF Nikkor 18mm f/2.8D"}, + {"33 54 3C 5E 24 24 62 02", "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF) Macro (A09)"}, + {"34 48 29 29 24 24 32 02", "AF Fisheye Nikkor 16mm f/2.8D"}, + {"35 3C A0 A0 30 30 33 02", "AF-I Nikkor 500mm f/4D IF-ED"}, + {"35 3C A0 A0 30 30 E1 02", "AF-I Nikkor 500mm f/4D IF-ED + TC-17E"}, + {"35 3C A0 A0 30 30 F1 02", "AF-I Nikkor 500mm f/4D IF-ED + TC-14E"}, + {"35 3C A0 A0 30 30 F2 02", "AF-I Nikkor 500mm f/4D IF-ED + TC-20E"}, + {"36 48 37 37 24 24 34 02", "AF Nikkor 24mm f/2.8D"}, + {"37 48 30 30 24 24 36 02", "AF Nikkor 20mm f/2.8D"}, + {"38 4C 62 62 14 14 37 02", "AF Nikkor 85mm f/1.8D"}, + {"3A 40 3C 5C 2C 34 39 02", "AF Zoom-Nikkor 28-70mm f/3.5-4.5D"}, + {"3B 48 44 5C 24 24 3A 02", "AF Zoom-Nikkor 35-70mm f/2.8D N"}, + {"3C 48 60 80 24 24 3B 02", "AF Zoom-Nikkor 80-200mm f/2.8D ED"}, + {"3D 3C 44 60 30 3C 3E 02", "AF Zoom-Nikkor 35-80mm f/4-5.6D"}, + {"3E 48 3C 3C 24 24 3D 02", "AF Nikkor 28mm f/2.8D"}, + {"3F 40 44 6A 2C 34 45 02", "AF Zoom-Nikkor 35-105mm f/3.5-4.5D"}, + {"41 48 7C 7C 24 24 43 02", "AF Nikkor 180mm f/2.8D IF-ED"}, + {"42 54 44 44 18 18 44 02", "AF Nikkor 35mm f/2D"}, + {"43 54 50 50 0C 0C 46 02", "AF Nikkor 50mm f/1.4D"}, + {"44 44 60 80 34 3C 47 02", "AF Zoom-Nikkor 80-200mm f/4.5-5.6D"}, + {"45 3D 3C 60 2C 3C 48 02", "Tamron AF 28-80mm f/3.5-5.6 Aspherical (177D)"}, + {"45 40 3C 60 2C 3C 48 02", "AF Zoom-Nikkor 28-80mm f/3.5-5.6D"}, + {"45 41 37 72 2C 3C 48 02", "Tamron SP AF 24-135mm f/3.5-5.6 AD Aspherical (IF) Macro (190D)"}, + {"46 3C 44 60 30 3C 49 02", "AF Zoom-Nikkor 35-80mm f/4-5.6D N"}, + {"47 42 37 50 2A 34 4A 02", "AF Zoom-Nikkor 24-50mm f/3.3-4.5D"}, + {"48 38 1F 37 34 3C 4B 06", "Sigma 12-24mm f/4.5-5.6 EX DG Aspherical HSM"}, + {"48 3C 19 31 30 3C 4B 06", "Sigma 10-20mm f/4-5.6 EX DC HSM"}, + {"48 3C 50 A0 30 40 4B 02", "Sigma 50-500mm f/4-6.3 EX APO RF HSM"}, + {"48 3C 8E B0 3C 3C 4B 02", "Sigma APO 300-800mm f/5.6 EX DG HSM"}, + {"48 3C B0 B0 3C 3C 4B 02", "Sigma APO 800mm f/5.6 EX HSM"}, + {"48 44 A0 A0 34 34 4B 02", "Sigma APO 500mm f/4.5 EX HSM"}, + {"48 48 24 24 24 24 4B 02", "Sigma 14mm f/2.8 EX Aspherical HSM"}, + {"48 48 2B 44 24 30 4B 06", "Sigma 17-35mm f/2.8-4 EX DG Aspherical HSM"}, + {"48 48 68 8E 30 30 4B 02", "Sigma APO 100-300mm f/4 EX IF HSM"}, + {"48 48 76 76 24 24 4B 06", "Sigma APO Macro 150mm f/2.8 EX DG HSM"}, + {"48 48 8E 8E 24 24 4B 02", "AF-S Nikkor 300mm f/2.8D IF-ED"}, + {"48 48 8E 8E 24 24 E1 02", "AF-S Nikkor 300mm f/2.8D IF-ED + TC-17E"}, + {"48 48 8E 8E 24 24 F1 02", "AF-S Nikkor 300mm f/2.8D IF-ED + TC-14E"}, + {"48 48 8E 8E 24 24 F2 02", "AF-S Nikkor 300mm f/2.8D IF-ED + TC-20E"}, + {"48 4C 7C 7C 2C 2C 4B 02", "Sigma APO Macro 180mm f/3.5 EX DG HSM"}, + {"48 4C 7D 7D 2C 2C 4B 02", "Sigma APO Macro 180mm f/3.5 EX DG HSM"}, + {"48 54 3E 3E 0C 0C 4B 06", "Sigma 30mm f/1.4 EX DC HSM"}, + {"48 54 5C 80 24 24 4B 02", "Sigma 70-200mm f/2.8 EX APO IF HSM"}, + {"48 54 6F 8E 24 24 4B 02", "Sigma APO 120-300mm f/2.8 EX DG HSM"}, + {"48 54 8E 8E 24 24 4B 02", "Sigma APO 300mm f/2.8 EX DG HSM"}, + {"49 3C A6 A6 30 30 4C 02", "AF-S Nikkor 600mm f/4D IF-ED"}, + {"49 3C A6 A6 30 30 E1 02", "AF-S Nikkor 600mm f/4D IF-ED + TC-17E"}, + {"49 3C A6 A6 30 30 F1 02", "AF-S Nikkor 600mm f/4D IF-ED + TC-14E"}, + {"49 3C A6 A6 30 30 F2 02", "AF-S Nikkor 600mm f/4D IF-ED + TC-20E"}, + {"4A 40 11 11 2C 0C 4D 02", "Samyang 8mm f/3.5 Fish-Eye CS"}, + {"4A 48 1E 1E 24 0C 4D 02", "Samyang 12mm f/2.8 ED AS NCS Fish-Eye"}, + {"4A 48 24 24 24 0C 4D 02", "Samyang AE 14mm f/2.8 ED AS IF UMC"}, + {"4A 54 29 29 18 0C 4D 02", "Samyang 16mm f/2.0 ED AS UMC CS"}, + {"4A 54 62 62 0C 0C 4D 02", "AF Nikkor 85mm f/1.4D IF"}, + {"4A 60 44 44 0C 0C 4D 02", "Samyang 35mm f/1.4 AS UMC"}, + {"4A 60 62 62 0C 0C 4D 02", "Samyang AE 85mm f/1.4 AS IF UMC"}, + {"4B 3C A0 A0 30 30 4E 02", "AF-S Nikkor 500mm f/4D IF-ED"}, + {"4B 3C A0 A0 30 30 E1 02", "AF-S Nikkor 500mm f/4D IF-ED + TC-17E"}, + {"4B 3C A0 A0 30 30 F1 02", "AF-S Nikkor 500mm f/4D IF-ED + TC-14E"}, + {"4B 3C A0 A0 30 30 F2 02", "AF-S Nikkor 500mm f/4D IF-ED + TC-20E"}, + {"4C 40 37 6E 2C 3C 4F 02", "AF Zoom-Nikkor 24-120mm f/3.5-5.6D IF"}, + {"4D 3E 3C 80 2E 3C 62 02", "Tamron AF 28-200mm f/3.8-5.6 XR Aspherical (IF) Macro (A03N)"}, + {"4D 40 3C 80 2C 3C 62 02", "AF Zoom-Nikkor 28-200mm f/3.5-5.6D IF"}, + {"4D 41 3C 8E 2B 40 62 02", "Tamron AF 28-300mm f/3.5-6.3 XR Di LD Aspherical (IF) (A061)"}, + {"4D 41 3C 8E 2C 40 62 02", "Tamron AF 28-300mm f/3.5-6.3 XR LD Aspherical (IF) (185D)"}, + {"4E 48 72 72 18 18 51 02", "AF DC-Nikkor 135mm f/2D"}, + {"4F 40 37 5C 2C 3C 53 06", "IX-Nikkor 24-70mm f/3.5-5.6"}, + {"50 48 56 7C 30 3C 54 06", "IX-Nikkor 60-180mm f/4-5.6"}, + {"52 54 44 44 18 18 00 00", "Zeiss Milvus 35mm f/2"}, + {"53 48 60 80 24 24 57 02", "AF Zoom-Nikkor 80-200mm f/2.8D ED"}, + {"53 48 60 80 24 24 60 02", "AF Zoom-Nikkor 80-200mm f/2.8D ED"}, + {"53 54 50 50 0C 0C 00 00", "Zeiss Milvus 50mm f/1.4"}, + {"54 44 5C 7C 34 3C 58 02", "AF Zoom-Micro Nikkor 70-180mm f/4.5-5.6D ED"}, + {"54 44 5C 7C 34 3C 61 02", "AF Zoom-Micro Nikkor 70-180mm f/4.5-5.6D ED"}, + {"54 54 50 50 18 18 00 00", "Zeiss Milvus 50mm f/2 Macro"}, + {"55 54 62 62 0C 0C 00 00", "Zeiss Milvus 85mm f/1.4"}, + {"56 3C 5C 8E 30 3C 1C 02", "Sigma 70-300mm f/4-5.6 APO Macro Super II"}, + {"56 48 5C 8E 30 3C 5A 02", "AF Zoom-Nikkor 70-300mm f/4-5.6D ED"}, + {"56 54 68 68 18 18 00 00", "Zeiss Milvus 100mm f/2 Macro"}, + {"59 48 98 98 24 24 5D 02", "AF-S Nikkor 400mm f/2.8D IF-ED"}, + {"59 48 98 98 24 24 E1 02", "AF-S Nikkor 400mm f/2.8D IF-ED + TC-17E"}, + {"59 48 98 98 24 24 F1 02", "AF-S Nikkor 400mm f/2.8D IF-ED + TC-14E"}, + {"59 48 98 98 24 24 F2 02", "AF-S Nikkor 400mm f/2.8D IF-ED + TC-20E"}, + {"5A 3C 3E 56 30 3C 5E 06", "IX-Nikkor 30-60mm f/4-5.6"}, + {"5B 44 56 7C 34 3C 5F 06", "IX-Nikkor 60-180mm f/4.5-5.6"}, + {"5D 48 3C 5C 24 24 63 02", "AF-S Zoom-Nikkor 28-70mm f/2.8D IF-ED"}, + {"5E 48 60 80 24 24 64 02", "AF-S Zoom-Nikkor 80-200mm f/2.8D IF-ED"}, + {"5F 40 3C 6A 2C 34 65 02", "AF Zoom-Nikkor 28-105mm f/3.5-4.5D IF"}, + {"60 40 3C 60 2C 3C 66 02", "AF Zoom-Nikkor 28-80mm f/3.5-5.6D"}, + {"61 44 5E 86 34 3C 67 02", "AF Zoom-Nikkor 75-240mm f/4.5-5.6D"}, + {"63 48 2B 44 24 24 68 02", "AF-S Nikkor 17-35mm f/2.8D IF-ED"}, + {"64 00 62 62 24 24 6A 02", "PC Micro-Nikkor 85mm f/2.8D"}, + {"65 44 60 98 34 3C 6B 0A", "AF VR Zoom-Nikkor 80-400mm f/4.5-5.6D ED"}, + {"66 40 2D 44 2C 34 6C 02", "AF Zoom-Nikkor 18-35mm f/3.5-4.5D IF-ED"}, + {"67 48 37 62 24 30 6D 02", "AF Zoom-Nikkor 24-85mm f/2.8-4D IF"}, + {"67 54 37 5C 24 24 1C 02", "Sigma 24-70mm f/2.8 EX DG Macro"}, + {"68 42 3C 60 2A 3C 6E 06", "AF Zoom-Nikkor 28-80mm f/3.3-5.6G"}, + {"69 47 5C 8E 30 3C 00 02", "Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2 (A17N)"}, + {"69 48 5C 8E 30 3C 6F 02", "Tamron AF 70-300mm f/4-5.6 LD Macro 1:2 (572D/772D)"}, + {"69 48 5C 8E 30 3C 6F 06", "AF Zoom-Nikkor 70-300mm f/4-5.6G"}, + {"6A 48 8E 8E 30 30 70 02", "AF-S Nikkor 300mm f/4D IF-ED"}, + {"6B 48 24 24 24 24 71 02", "AF Nikkor ED 14mm f/2.8D"}, + {"6D 48 8E 8E 24 24 73 02", "AF-S Nikkor 300mm f/2.8D IF-ED II"}, + {"6E 48 98 98 24 24 74 02", "AF-S Nikkor 400mm f/2.8D IF-ED II"}, + {"6F 3C A0 A0 30 30 75 02", "AF-S Nikkor 500mm f/4D IF-ED II"}, + {"70 3C A6 A6 30 30 76 02", "AF-S Nikkor 600mm f/4D IF-ED II"}, + {"72 48 4C 4C 24 24 77 00", "Nikkor 45mm f/2.8 P"}, + {"74 40 37 62 2C 34 78 06", "AF-S Zoom-Nikkor 24-85mm f/3.5-4.5G IF-ED"}, + {"75 40 3C 68 2C 3C 79 06", "AF Zoom-Nikkor 28-100mm f/3.5-5.6G"}, + {"76 58 50 50 14 14 7A 02", "AF Nikkor 50mm f/1.8D"}, + {"77 44 61 98 34 3C 7B 0E", "Sigma 80-400mm f/4.5-5.6 EX OS"}, + {"77 48 5C 80 24 24 7B 0E", "AF-S VR Zoom-Nikkor 70-200mm f/2.8G IF-ED"}, + {"78 40 37 6E 2C 3C 7C 0E", "AF-S VR Zoom-Nikkor 24-120mm f/3.5-5.6G IF-ED"}, + {"79 40 11 11 2C 2C 1C 06", "Sigma 8mm f/3.5 EX Circular Fisheye"}, + {"79 40 3C 80 2C 3C 7F 06", "AF Zoom-Nikkor 28-200mm f/3.5-5.6G IF-ED"}, + {"79 48 3C 5C 24 24 1C 06", "Sigma 28-70mm f/2.8 EX DG"}, + {"79 48 5C 5C 24 24 1C 06", "Sigma Macro 70mm f/2.8 EX DG"}, + {"7A 3B 53 80 30 3C 4B 06", "Sigma 55-200mm f/4-5.6 DC HSM"}, + {"7A 3C 1F 37 30 30 7E 06", "AF-S DX Zoom-Nikkor 12-24mm f/4G IF-ED"}, + {"7A 3C 1F 37 30 30 7E 06", "Tokina AT-X 124 AF PRO DX II (AF 12-24mm f/4)"}, + {"7A 3C 1F 3C 30 30 7E 06", "Tokina AT-X 12-28 PRO DX (AF 12-28mm f/4)"}, + {"7A 40 2D 50 2C 3C 4B 06", "Sigma 18-50mm f/3.5-5.6 DC HSM"}, + {"7A 40 2D 80 2C 40 4B 0E", "Sigma 18-200mm f/3.5-6.3 DC OS HSM"}, + {"7A 47 2B 5C 24 34 4B 06", "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF HSM"}, + {"7A 47 50 76 24 24 4B 06", "Sigma 50-150mm f/2.8 EX APO DC HSM"}, + {"7A 48 1C 29 24 24 7E 06", "Tokina AT-X 116 PRO DX II (AF 11-16mm f/2.8)"}, + {"7A 48 1C 30 24 24 7E 06", "Tokina AT-X 11-20 f/2.8 PRO DX (AF 11-20mm f/2.8)"}, + {"7A 48 2B 5C 24 34 4B 06", "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF HSM"}, + {"7A 48 2D 50 24 24 4B 06", "Sigma 18-50mm f/2.8 EX DC Macro"}, + {"7A 48 5C 80 24 24 4B 06", "Sigma 70-200mm f/2.8 EX APO DG Macro HSM II"}, + {"7A 54 6E 8E 24 24 4B 02", "Sigma APO 120-300mm f/2.8 EX DG HSM"}, + {"7B 48 80 98 30 30 80 0E", "AF-S VR Zoom-Nikkor 200-400mm f/4G IF-ED"}, + {"7D 48 2B 53 24 24 82 06", "AF-S DX Zoom-Nikkor 17-55mm f/2.8G IF-ED"}, + {"7F 40 2D 5C 2C 34 84 06", "AF-S DX Zoom-Nikkor 18-70mm f/3.5-4.5G IF-ED"}, + {"7F 48 2B 5C 24 34 1C 06", "Sigma 17-70mm f/2.8-4.5 DC Macro Asp. IF"}, + {"7F 48 2D 50 24 24 1C 06", "Sigma 18-50mm f/2.8 EX DC Macro"}, + {"80 48 1A 1A 24 24 85 06", "AF DX Fisheye-Nikkor 10.5mm f/2.8G ED"}, + {"81 34 76 A6 38 40 4B 0E", "Sigma 150-600mm f/5-6.3 DG OS HSM | S"}, + {"81 54 80 80 18 18 86 0E", "AF-S VR Nikkor 200mm f/2G IF-ED"}, + {"82 34 76 A6 38 40 4B 0E", "Sigma 150-600mm f/5-6.3 DG OS HSM | C"}, + {"82 48 8E 8E 24 24 87 0E", "AF-S VR Nikkor 300mm f/2.8G IF-ED"}, + {"83 00 B0 B0 5A 5A 88 04", "FSA-L2, EDG 65, 800mm f/13 G"}, + {"88 54 50 50 0C 0C 4B 06", "Sigma 50mm f/1.4 DG HSM | A"}, + {"89 3C 53 80 30 3C 8B 06", "AF-S DX Zoom-Nikkor 55-200mm f/4-5.6G ED"}, + {"8A 3C 37 6A 30 30 4B 0E", "Sigma 24-105mm f/4 DG OS HSM"}, + {"8A 54 6A 6A 24 24 8C 0E", "AF-S VR Micro-Nikkor 105mm f/2.8G IF-ED"}, + {"8B 40 2D 80 2C 3C 8D 0E", "AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED"}, + {"8B 40 2D 80 2C 3C FD 0E", "AF-S DX VR Zoom-Nikkor 18-200mm f/3.5-5.6G IF-ED [II]"}, + {"8B 4C 2D 44 14 14 4B 06", "Sigma 18-35mm f/1.8 DC HSM"}, + {"8C 40 2D 53 2C 3C 8E 06", "AF-S DX Zoom-Nikkor 18-55mm f/3.5-5.6G ED"}, + {"8D 44 5C 8E 34 3C 8F 0E", "AF-S VR Zoom-Nikkor 70-300mm f/4.5-5.6G IF-ED"}, + {"8E 3C 2B 5C 24 30 4B 0E", "Sigma 17-70mm f/2.8-4 DC Macro OS HSM | C"}, + {"8F 40 2D 72 2C 3C 91 06", "AF-S DX Zoom-Nikkor 18-135mm f/3.5-5.6G IF-ED"}, + {"8F 48 2B 50 24 24 4B 0E", "Sigma 17-50mm f/2.8 EX DC OS HSM"}, + {"90 3B 53 80 30 3C 92 0E", "AF-S DX VR Zoom-Nikkor 55-200mm f/4-5.6G IF-ED"}, + {"90 40 2D 80 2C 40 4B 0E", "Sigma 18-200mm f/3.5-6.3 II DC OS HSM"}, + {"91 54 44 44 0C 0C 4B 06", "Sigma 35mm f/1.4 DG HSM"}, + {"92 2C 2D 88 2C 40 4B 0E", "Sigma 18-250mm f/3.5-6.3 DC Macro OS HSM"}, + {"92 48 24 37 24 24 94 06", "AF-S Zoom-Nikkor 14-24mm f/2.8G ED"}, + {"93 48 37 5C 24 24 95 06", "AF-S Zoom-Nikkor 24-70mm f/2.8G ED"}, + {"94 40 2D 53 2C 3C 96 06", "AF-S DX Zoom-Nikkor 18-55mm f/3.5-5.6G ED II"}, + {"95 00 37 37 2C 2C 97 06", "PC-E Nikkor 24mm f/3.5D ED"}, + {"95 4C 37 37 2C 2C 97 02", "PC-E Nikkor 24mm f/3.5D ED"}, + {"96 38 1F 37 34 3C 4B 06", "Sigma 12-24mm f/4.5-5.6 II DG HSM"}, + {"96 48 98 98 24 24 98 0E", "AF-S VR Nikkor 400mm f/2.8G ED"}, + {"97 3C A0 A0 30 30 99 0E", "AF-S VR Nikkor 500mm f/4G ED"}, + {"97 48 6A 6A 24 24 4B 0E", "Sigma Macro 105mm f/2.8 EX DG OS HSM"}, + {"98 3C A6 A6 30 30 9A 0E", "AF-S VR Nikkor 600mm f/4G ED"}, + {"98 48 50 76 24 24 4B 0E", "Sigma 50-150mm f/2.8 EX APO DC OS HSM"}, + {"99 40 29 62 2C 3C 9B 0E", "AF-S DX VR Zoom-Nikkor 16-85mm f/3.5-5.6G ED"}, + {"99 48 76 76 24 24 4B 0E", "Sigma APO Macro 150mm f/2.8 EX DG OS HSM"}, + {"9A 40 2D 53 2C 3C 9C 0E", "AF-S DX VR Zoom-Nikkor 18-55mm f/3.5-5.6G"}, + {"9B 00 4C 4C 24 24 9D 06", "PC-E Micro Nikkor 45mm f/2.8D ED"}, + {"9B 54 4C 4C 24 24 9D 02", "PC-E Micro Nikkor 45mm f/2.8D ED"}, + {"9B 54 62 62 0C 0C 4B 06", "Sigma 85mm f/1.4 EX DG HSM"}, + {"9C 48 5C 80 24 24 4B 0E", "Sigma 70-200mm f/2.8 EX DG OS HSM"}, + {"9C 54 56 56 24 24 9E 06", "AF-S Micro Nikkor 60mm f/2.8G ED"}, + {"9D 00 62 62 24 24 9F 06", "PC-E Micro Nikkor 85mm f/2.8D"}, + {"9D 48 2B 50 24 24 4B 0E", "Sigma 17-50mm f/2.8 EX DC OS HSM"}, + {"9D 54 62 62 24 24 9F 02", "PC-E Micro Nikkor 85mm f/2.8D"}, + {"9E 38 11 29 34 3C 4B 06", "Sigma 8-16mm f/4.5-5.6 DC HSM"}, + {"9E 40 2D 6A 2C 3C A0 0E", "AF-S DX VR Zoom-Nikkor 18-105mm f/3.5-5.6G ED"}, + {"9F 37 50 A0 34 40 4B 0E", "Sigma 50-500mm f/4.5-6.3 DG OS HSM"}, + {"9F 58 44 44 14 14 A1 06", "AF-S DX Nikkor 35mm f/1.8G"}, + {"A0 40 2D 74 2C 3C BB 0E", "AF-S DX Nikkor 18-140mm f/3.5-5.6G ED VR"}, + {"A0 48 2A 5C 24 30 4B 0E", "Sigma 17-70mm f/2.8-4 DC Macro OS HSM"}, + {"A0 54 50 50 0C 0C A2 06", "AF-S Nikkor 50mm f/1.4G"}, + {"A1 40 18 37 2C 34 A3 06", "AF-S DX Nikkor 10-24mm f/3.5-4.5G ED"}, + {"A1 41 19 31 2C 2C 4B 06", "Sigma 10-20mm f/3.5 EX DC HSM"}, + {"A1 54 55 55 0C 0C BC 06", "AF-S Nikkor 58mm f/1.4G"}, + {"A2 40 2D 53 2C 3C BD 0E", "AF-S DX Nikkor 18-55mm f/3.5-5.6G VR II"}, + {"A2 48 5C 80 24 24 A4 0E", "AF-S Nikkor 70-200mm f/2.8G ED VR II"}, + {"A3 3C 29 44 30 30 A5 0E", "AF-S Nikkor 16-35mm f/4G ED VR"}, + {"A3 3C 5C 8E 30 3C 4B 0E", "Sigma 70-300mm f/4-5.6 DG OS"}, + {"A4 40 2D 8E 2C 40 BF 0E", "AF-S DX Nikkor 18-300mm f/3.5-6.3G ED VR"}, + {"A4 47 2D 50 24 34 4B 0E", "Sigma 18-50mm f/2.8-4.5 DC OS HSM"}, + {"A4 54 37 37 0C 0C A6 06", "AF-S Nikkor 24mm f/1.4G ED"}, + {"A5 40 2D 88 2C 40 4B 0E", "Sigma 18-250mm f/3.5-6.3 DC OS HSM"}, + {"A5 40 3C 8E 2C 3C A7 0E", "AF-S Nikkor 28-300mm f/3.5-5.6G ED VR"}, + {"A5 4C 44 44 14 14 C0 06", "AF-S Nikkor 35mm f/1.8G ED"}, + {"A6 48 37 5C 24 24 4B 06", "Sigma 24-70mm f/2.8 IF EX DG HSM"}, + {"A6 48 8E 8E 24 24 A8 0E", "AF-S VR Nikkor 300mm f/2.8G IF-ED II"}, + {"A6 48 98 98 24 24 C1 0E", "AF-S Nikkor 400mm f/2.8E FL ED VR"}, + {"A7 3C 53 80 30 3C C2 0E", "AF-S DX Nikkor 55-200mm f/4-5.6G ED VR II"}, + {"A7 49 80 A0 24 24 4B 06", "Sigma APO 200-500mm f/2.8 EX DG"}, + {"A7 4B 62 62 2C 2C A9 0E", "AF-S DX Micro Nikkor 85mm f/3.5G ED VR"}, + {"A8 48 80 98 30 30 AA 0E", "AF-S VR Zoom-Nikkor 200-400mm f/4G IF-ED II"}, + {"A8 48 8E 8E 30 30 C3 0E", "AF-S Nikkor 300mm f/4E PF ED VR"}, + {"A8 48 8E 8E 30 30 C3 4E", "AF-S Nikkor 300mm f/4E PF ED VR"}, + {"A9 4C 31 31 14 14 C4 06", "AF-S Nikkor 20mm f/1.8G ED"}, + {"A9 54 80 80 18 18 AB 0E", "AF-S Nikkor 200mm f/2G ED VR II"}, + {"AA 3C 37 6E 30 30 AC 0E", "AF-S Nikkor 24-120mm f/4G ED VR"}, + {"AA 48 37 5C 24 24 C5 4E", "AF-S Nikkor 24-70mm f/2.8E ED VR"}, + {"AB 3C A0 A0 30 30 C6 4E", "AF-S Nikkor 500mm f/4E FL ED VR"}, + {"AC 38 53 8E 34 3C AE 0E", "AF-S DX VR Nikkor 55-300mm f/4.5-5.6G ED"}, + {"AC 3C A6 A6 30 30 C7 4E", "AF-S Nikkor 600mm f/4E FL ED VR"}, + {"AD 3C 2D 8E 2C 3C AF 0E", "AF-S DX Nikkor 18-300mm f/3.5-5.6G ED VR"}, + {"AD 48 28 60 24 30 C8 0E", "AF-S DX Nikkor 16-80mm f/2.8-4E ED VR"}, + {"AD 48 28 60 24 30 C8 4E", "AF-S DX Nikkor 16-80mm f/2.8-4E ED VR"}, + {"AE 3C 80 A0 3C 3C C9 0E", "AF-S Nikkor 200-500mm f/5.6E ED VR"}, + {"AE 3C 80 A0 3C 3C C9 4E", "AF-S Nikkor 200-500mm f/5.6E ED VR"}, + {"AE 54 62 62 0C 0C B0 06", "AF-S Nikkor 85mm f/1.4G"}, + {"AF 4C 37 37 14 14 CC 06", "AF-S Nikkor 24mm f/1.8G ED"}, + {"AF 54 44 44 0C 0C B1 06", "AF-S Nikkor 35mm f/1.4G"}, + {"B0 4C 50 50 14 14 B2 06", "AF-S Nikkor 50mm f/1.8G"}, + {"B1 48 48 48 24 24 B3 06", "AF-S DX Micro Nikkor 40mm f/2.8G"}, + {"B2 48 5C 80 30 30 B4 0E", "AF-S Nikkor 70-200mm f/4G ED VR"}, + {"B3 4C 62 62 14 14 B5 06", "AF-S Nikkor 85mm f/1.8G"}, + {"B4 40 37 62 2C 34 B6 0E", "AF-S VR Zoom-Nikkor 24-85mm f/3.5-4.5G IF-ED"}, + {"B5 4C 3C 3C 14 14 B7 06", "AF-S Nikkor 28mm f/1.8G"}, + {"B6 3C B0 B0 3C 3C B8 0E", "AF-S VR Nikkor 800mm f/5.6E FL ED"}, + {"B6 48 37 56 24 24 1C 02", "Sigma 24-60mm f/2.8 EX DG"}, + {"B7 44 60 98 34 3C B9 0E", "AF-S Nikkor 80-400mm f/4.5-5.6G ED VR"}, + {"B8 40 2D 44 2C 34 BA 06", "AF-S Nikkor 18-35mm f/3.5-4.5G ED"}, + {"CC 4C 50 68 14 14 4B 06", "Sigma 50-100mm f/1.8 DC HSM | A"}, + {"CD 3D 2D 70 2E 3C 4B 0E", "Sigma 18-125mm f/3.8-5.6 DC OS HSM"}, + {"CE 34 76 A0 38 40 4B 0E", "Sigma 150-500mm f/5-6.3 DG OS APO HSM"}, + {"CF 38 6E 98 34 3C 4B 0E", "Sigma APO 120-400mm f/4.5-5.6 DG OS HSM"}, + {"DC 48 19 19 24 24 4B 06", "Sigma 10mm f/2.8 EX DC HSM Fisheye"}, + {"DE 54 50 50 0C 0C 4B 06", "Sigma 50mm f/1.4 EX DG HSM"}, + {"E0 3C 5C 8E 30 3C 4B 06", "Sigma 70-300mm f/4-5.6 APO DG Macro HSM"}, + {"E1 58 37 37 14 14 1C 02", "Sigma 24mm f/1.8 EX DG Aspherical Macro"}, + {"E3 54 50 50 24 24 35 02", "Sigma Macro 50mm f/2.8 EX DG"}, + {"E5 54 6A 6A 24 24 35 02", "Sigma Macro 105mm f/2.8 EX DG"}, + {"E6 41 3C 8E 2C 40 1C 02", "Sigma 28-300mm f/3.5-6.3 DG Macro"}, + {"E8 4C 44 44 14 14 DF 0E", "Tamron SP 35mm f/1.8 VC"}, + {"E9 48 27 3E 24 24 DF 0E", "Tamron SP 15-30mm f/2.8 Di VC USD (A012)"}, + {"E9 54 37 5C 24 24 1C 02", "Sigma 24-70mm f/2.8 EX DG Macro"}, + {"EA 40 29 8E 2C 40 DF 0E", "Tamron AF 16-300mm f/3.5-6.3 Di II VC PZD (B016)"}, + {"EA 48 27 27 24 24 1C 02", "Sigma 15mm f/2.8 EX Diagonal Fisheye"}, + {"EB 40 76 A6 38 40 DF 0E", "Tamron SP AF 150-600mm f/5-6.3 VC USD (A011)"}, + {"ED 40 2D 80 2C 40 4B 0E", "Sigma 18-200mm f/3.5-6.3 DC OS HSM"}, + {"EE 48 5C 80 24 24 4B 06", "Sigma 70-200mm f/2.8 EX APO DG Macro HSM II"}, + {"F0 38 1F 37 34 3C 4B 06", "Sigma 12-24mm f/4.5-5.6 EX DG Aspherical HSM"}, + {"F0 3F 2D 8A 2C 40 DF 0E", "Tamron AF 18-270mm f/3.5-6.3 Di II VC PZD (B008)"}, + {"F1 44 A0 A0 34 34 4B 02", "Sigma APO 500mm f/4.5 EX DG HSM"}, + {"F1 47 5C 8E 30 3C DF 0E", "Tamron SP 70-300mm f/4-5.6 Di VC USD (A005)"}, + {"F3 48 68 8E 30 30 4B 02", "Sigma APO 100-300mm f/4 EX IF HSM"}, + {"F3 54 2B 50 24 24 84 0E", "Tamron SP AF 17-50mm f/2.8 XR Di II VC LD Aspherical (IF) (B005)"}, + {"F4 54 56 56 18 18 84 06", "Tamron SP AF 60mm f/2.0 Di II Macro 1:1 (G005)"}, + {"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)"}, + {"F5 48 76 76 24 24 4B 06", "Sigma APO Macro 150mm f/2.8 EX DG HSM"}, + {"F6 3F 18 37 2C 34 84 06", "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical (IF) (B001)"}, + {"F6 3F 18 37 2C 34 DF 06", "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical (IF) (B001)"}, + {"F6 48 2D 50 24 24 4B 06", "Sigma 18-50mm f/2.8 EX DC Macro"}, + {"F7 53 5C 80 24 24 40 06", "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)"}, + {"F7 53 5C 80 24 24 84 06", "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)"}, + {"F8 54 3E 3E 0C 0C 4B 06", "Sigma 30mm f/1.4 EX DC HSM"}, + {"F8 54 64 64 24 24 DF 06", "Tamron SP AF 90mm f/2.8 Di Macro 1:1 (272NII)"}, + {"F8 55 64 64 24 24 84 06", "Tamron SP AF 90mm f/2.8 Di Macro 1:1 (272NII)"}, + {"F9 3C 19 31 30 3C 4B 06", "Sigma 10-20mm f/4-5.6 EX DC HSM"}, + {"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)"}, + {"FA 54 3C 5E 24 24 84 06", "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF) Macro (A09NII)"}, + {"FA 54 3C 5E 24 24 DF 06", "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical (IF) Macro (A09NII)"}, + {"FA 54 6E 8E 24 24 4B 02", "Sigma APO 120-300mm f/2.8 EX DG HSM"}, + {"FB 54 2B 50 24 24 84 06", "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16NII)"}, + {"FB 54 8E 8E 24 24 4B 02", "Sigma APO 300mm f/2.8 EX DG HSM"}, + {"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)"}, + {"FD 47 50 76 24 24 4B 06", "Sigma 50-150mm f/2.8 EX APO DC HSM II"}, + {"FE 47 00 00 24 24 4B 06", "Sigma 4.5mm f/2.8 EX DC HSM Circular Fisheye"}, + {"FE 48 37 5C 24 24 DF 0E", "Tamron SP 24-70mm f/2.8 Di VC USD (A007)"}, + {"FE 53 5C 80 24 24 84 06", "Tamron SP AF 70-200mm f/2.8 Di LD (IF) Macro (A001)"}, + {"FE 54 5C 80 24 24 DF 0E", "Tamron SP 70-200mm f/2.8 Di VC USD (A009)"}, + {"FE 54 64 64 24 24 DF 0E", "Tamron SP 90mm f/2.8 Di VC USD Macro 1:1 (F004)"}, + {"FF 40 2D 80 2C 40 4B 06", "Sigma 18-200mm f/3.5-6.3 DC"} +}; const TagAttrib nikonISOInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "ISO", &naISOInfoISOInterpreter}, - {0, AC_WRITE, 0, 0, 0x0004, SHORT, "ISOExpansion", &naISOExpansionInterpreter}, - {0, AC_WRITE, 0, 0, 0x0006, AUTO, "ISO2", &naISOInfoISOInterpreter}, - {0, AC_WRITE, 0, 0, 0x000a, SHORT, "ISOExpansion2", &naISOExpansionInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "ISO", &naISOInfoISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0004, SHORT, "ISOExpansion", &naISOExpansionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0006, AUTO, "ISO2", &naISOInfoISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000a, SHORT, "ISOExpansion2", &naISOExpansionInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib nikon2Attribs[] = { - {0, AC_WRITE, 0, 0, 0x0002, AUTO, "Unknown", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0003, AUTO, "Quality", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0004, AUTO, "ColorMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0005, AUTO, "ImageAdjustment", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0006, AUTO, "ISOSpeed", &naISOInterpreter}, - {0, AC_WRITE, 0, 0, 0x0007, AUTO, "WhiteBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0008, AUTO, "Focus", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0009, AUTO, "Unknown", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000a, AUTO, "DigitalZoom", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000b, AUTO, "AuxiliaryLens", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0f00, AUTO, "Unknown", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0002, AUTO, "Unknown", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "Quality", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0004, AUTO, "ColorMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0005, AUTO, "ImageAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0006, AUTO, "ISOSpeed", &naISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0007, AUTO, "WhiteBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0008, AUTO, "Focus", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0009, AUTO, "Unknown", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000a, AUTO, "DigitalZoom", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000b, AUTO, "AuxiliaryLens", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0f00, AUTO, "Unknown", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib nikon3Attribs[] = { - {0, AC_WRITE, 0, 0, 0x0001, AUTO, "MakerNoteVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0002, AUTO, "ISOSpeed", &naISOInterpreter}, - {0, AC_WRITE, 0, 0, 0x0003, AUTO, "ColorMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0004, AUTO, "Quality", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0005, AUTO, "WhiteBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0006, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0007, AUTO, "FocusMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0008, AUTO, "FlashSetting", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0009, AUTO, "FlashType", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000b, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, - {0, AC_NEW, 0, 0, 0x000c, AUTO, "ColorBalance1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000d, AUTO, "ProgramShift", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000e, AUTO, "ExposureDifference", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000f, AUTO, "ISOSelection", &naISOInterpreter}, - {0, AC_WRITE, 0, 0, 0x0010, AUTO, "DataDump", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0011, AUTO, "NikonPreview", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0012, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0013, AUTO, "ISOSetting", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0016, AUTO, "ImageBoundary", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0018, AUTO, "FlashExposureBracketValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0019, AUTO, "ExposureBracketValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001a, AUTO, "ImageProcessing", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001b, AUTO, "CropHiSpeed", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001d, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001e, AUTO, "ColorSpace", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0020, AUTO, "ImageAuthentication", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "MakerNoteVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0002, AUTO, "ISOSpeed", &naISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "ColorMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0004, AUTO, "Quality", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0005, AUTO, "WhiteBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0006, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0007, AUTO, "FocusMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0008, AUTO, "FlashSetting", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0009, AUTO, "FlashType", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000b, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, + {0, AC_NEW, 0, nullptr, 0x000c, AUTO, "ColorBalance1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000d, AUTO, "ProgramShift", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000e, AUTO, "ExposureDifference", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000f, AUTO, "ISOSelection", &naISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0010, AUTO, "DataDump", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0011, AUTO, "NikonPreview", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0012, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0013, AUTO, "ISOSetting", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0016, AUTO, "ImageBoundary", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0018, AUTO, "FlashExposureBracketValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0019, AUTO, "ExposureBracketValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001a, AUTO, "ImageProcessing", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001b, AUTO, "CropHiSpeed", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001d, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001e, AUTO, "ColorSpace", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0020, AUTO, "ImageAuthentication", &stdInterpreter}, {0, AC_WRITE, 0, nikonISOInfoAttribs, 0x0025, AUTO, "ISOInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0080, AUTO, "ImageAdjustment", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0081, AUTO, "ToneComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0082, AUTO, "AuxiliaryLens", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0083, AUTO, "LensType", &naLensTypeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0084, AUTO, "Lens", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0085, AUTO, "ManualFocusDistance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0086, AUTO, "DigitalZoom", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0087, AUTO, "FlashMode", &naFlashModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0088, AUTO, "AFInfo", &naAFInfoInterpreter}, - {0, AC_WRITE, 0, 0, 0x0089, AUTO, "ShootingMode", &naShootingModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x008a, AUTO, "AutoBracketRelease", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x008b, AUTO, "LensFStops", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x008c, AUTO, "NEFCurve1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x008d, AUTO, "ColorHue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x008f, AUTO, "SceneMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0090, AUTO, "LightSource", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0091, AUTO, "ShotInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0092, AUTO, "HueAdjustment", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0094, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0095, AUTO, "NoiseReduction", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0096, AUTO, "NEFCurve2", &stdInterpreter}, - {0, AC_NEW, 0, 0, 0x0097, AUTO, "ColorBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0098, AUTO, "LensData", &naLensDataInterpreter}, - {0, AC_WRITE, 0, 0, 0x0099, AUTO, "RawImageCenter", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x009a, AUTO, "SensorPixelSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a0, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a2, AUTO, "ImageDataSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a5, AUTO, "ImageCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a6, AUTO, "DeletedImageCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a7, AUTO, "ShutterCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00a9, AUTO, "ImageOptimization", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00aa, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00ab, AUTO, "VariProgram", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00ac, AUTO, "ImageStabilization", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00ad, AUTO, "AFResponse", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00b0, AUTO, "MultiExposure", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x00b1, AUTO, "HighISONoiseReduction", &naHiISONRInterpreter}, - {0, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0x0e01, AUTO, "NikonCaptureData", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0x0e09, AUTO, "NikonCaptureVersion", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0x0e0e, AUTO, "NikonCaptureOffsets", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0x0e10, AUTO, "NikonScanIFD", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0080, AUTO, "ImageAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0081, AUTO, "ToneComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0082, AUTO, "AuxiliaryLens", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0083, AUTO, "LensType", &naLensTypeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0084, AUTO, "Lens", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0085, AUTO, "ManualFocusDistance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0086, AUTO, "DigitalZoom", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0087, AUTO, "FlashMode", &naFlashModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0088, AUTO, "AFInfo", &naAFInfoInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0089, AUTO, "ShootingMode", &naShootingModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008a, AUTO, "AutoBracketRelease", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008b, AUTO, "LensFStops", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008c, AUTO, "NEFCurve1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008d, AUTO, "ColorHue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008f, AUTO, "SceneMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0090, AUTO, "LightSource", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0091, AUTO, "ShotInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0092, AUTO, "HueAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0094, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0095, AUTO, "NoiseReduction", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0096, AUTO, "NEFCurve2", &stdInterpreter}, + {0, AC_NEW, 0, nullptr, 0x0097, AUTO, "ColorBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0098, AUTO, "LensData", &naLensDataInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0099, AUTO, "RawImageCenter", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x009a, AUTO, "SensorPixelSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a0, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a2, AUTO, "ImageDataSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a5, AUTO, "ImageCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a6, AUTO, "DeletedImageCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a7, AUTO, "ShutterCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a9, AUTO, "ImageOptimization", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00aa, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00ab, AUTO, "VariProgram", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00ac, AUTO, "ImageStabilization", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00ad, AUTO, "AFResponse", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00b0, AUTO, "MultiExposure", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00b1, AUTO, "HighISONoiseReduction", &naHiISONRInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0x0e01, AUTO, "NikonCaptureData", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0x0e09, AUTO, "NikonCaptureVersion", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0x0e0e, AUTO, "NikonCaptureOffsets", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0x0e10, AUTO, "NikonScanIFD", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; } diff --git a/rtexif/olympusattribs.cc b/rtexif/olympusattribs.cc index 35e390b88..4b61225a0 100644 --- a/rtexif/olympusattribs.cc +++ b/rtexif/olympusattribs.cc @@ -535,304 +535,304 @@ public: OLFlashModelInterpreter olFlashModelInterpreter; const TagAttrib olyFocusInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "FocusInfoVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0209, AUTO, "AutoFocus", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0210, AUTO, "SceneDetect", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0211, AUTO, "SceneArea", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0212, AUTO, "SceneDetectData", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0300, AUTO, "ZoomStepCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0301, AUTO, "FocusStepCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0303, AUTO, "FocusStepInfinity", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0304, AUTO, "FocusStepNear", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0305, AUTO, "FocusDistance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0308, AUTO, "AFPoint", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1201, AUTO, "ExternalFlash", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1203, AUTO, "ExternalFlashGuideNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1204, AUTO, "ExternalFlashBounce", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1205, AUTO, "ExternalFlashZoom", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1208, AUTO, "InternalFlash", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1209, AUTO, "ManualFlash", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1500, AUTO, "SensorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1600, AUTO, "ImageStabilization", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "FocusInfoVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0209, AUTO, "AutoFocus", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0210, AUTO, "SceneDetect", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0211, AUTO, "SceneArea", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0212, AUTO, "SceneDetectData", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0300, AUTO, "ZoomStepCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0301, AUTO, "FocusStepCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0303, AUTO, "FocusStepInfinity", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0304, AUTO, "FocusStepNear", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0305, AUTO, "FocusDistance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0308, AUTO, "AFPoint", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1201, AUTO, "ExternalFlash", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1203, AUTO, "ExternalFlashGuideNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1204, AUTO, "ExternalFlashBounce", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1205, AUTO, "ExternalFlashZoom", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1208, AUTO, "InternalFlash", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1209, AUTO, "ManualFlash", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1500, AUTO, "SensorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1600, AUTO, "ImageStabilization", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib olyImageProcessingAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "ImageProcessingVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0100, AUTO, "WB_RBLevels", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0102, AUTO, "WB_RBLevels3000K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0103, AUTO, "WB_RBLevels3300K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "WB_RBLevels3600K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0105, AUTO, "WB_RBLevels3900K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0106, AUTO, "WB_RBLevels4000K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0107, AUTO, "WB_RBLevels4300K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0108, AUTO, "WB_RBLevels4500K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0109, AUTO, "WB_RBLevels4800K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010a, AUTO, "WB_RBLevels5300K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010b, AUTO, "WB_RBLevels6000K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010c, AUTO, "WB_RBLevels6600K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010d, AUTO, "WB_RBLevels7500K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010e, AUTO, "WB_RBLevelsCWB1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010f, AUTO, "WB_RBLevelsCWB2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0110, AUTO, "WB_RBLevelsCWB3", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0111, AUTO, "WB_RBLevelsCWB4", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0113, AUTO, "WB_GLevel3000K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0114, AUTO, "WB_GLevel3300K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0115, AUTO, "WB_GLevel3600K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0116, AUTO, "WB_GLevel3900K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0117, AUTO, "WB_GLevel4000K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0118, AUTO, "WB_GLevel4300K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0119, AUTO, "WB_GLevel4500K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x011a, AUTO, "WB_GLevel4800K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x011b, AUTO, "WB_GLevel5300K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x011c, AUTO, "WB_GLevel6000K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x011d, AUTO, "WB_GLevel6600K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x011e, AUTO, "WB_GLevel7500K", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x011f, AUTO, "WB_GLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0200, AUTO, "ColorMatrix", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0300, AUTO, "Enhancer", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0301, AUTO, "EnhancerValues", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0310, AUTO, "CoringFilter", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0311, AUTO, "CoringValues", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0600, AUTO, "BlackLevel2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0610, AUTO, "GainBase", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0611, AUTO, "ValidBits", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0612, AUTO, "CropLeft", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0613, AUTO, "CropTop", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0614, AUTO, "CropWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0615, AUTO, "CropHeight", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1010, AUTO, "NoiseReduction2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1011, AUTO, "DistortionCorrection2", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1012, AUTO, "ShadingCompensation2", &olOnOffInterpreter}, - {1, AC_WRITE, 0, 0, 0x1103, AUTO, "UnknownBlock", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1200, AUTO, "FaceDetect", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x1201, AUTO, "FaceDetectArea", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "ImageProcessingVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0100, AUTO, "WB_RBLevels", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0102, AUTO, "WB_RBLevels3000K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0103, AUTO, "WB_RBLevels3300K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "WB_RBLevels3600K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0105, AUTO, "WB_RBLevels3900K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0106, AUTO, "WB_RBLevels4000K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0107, AUTO, "WB_RBLevels4300K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0108, AUTO, "WB_RBLevels4500K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0109, AUTO, "WB_RBLevels4800K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010a, AUTO, "WB_RBLevels5300K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010b, AUTO, "WB_RBLevels6000K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010c, AUTO, "WB_RBLevels6600K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010d, AUTO, "WB_RBLevels7500K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010e, AUTO, "WB_RBLevelsCWB1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010f, AUTO, "WB_RBLevelsCWB2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0110, AUTO, "WB_RBLevelsCWB3", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0111, AUTO, "WB_RBLevelsCWB4", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0113, AUTO, "WB_GLevel3000K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0114, AUTO, "WB_GLevel3300K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0115, AUTO, "WB_GLevel3600K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0116, AUTO, "WB_GLevel3900K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0117, AUTO, "WB_GLevel4000K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0118, AUTO, "WB_GLevel4300K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0119, AUTO, "WB_GLevel4500K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x011a, AUTO, "WB_GLevel4800K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x011b, AUTO, "WB_GLevel5300K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x011c, AUTO, "WB_GLevel6000K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x011d, AUTO, "WB_GLevel6600K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x011e, AUTO, "WB_GLevel7500K", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x011f, AUTO, "WB_GLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0200, AUTO, "ColorMatrix", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0300, AUTO, "Enhancer", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0301, AUTO, "EnhancerValues", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0310, AUTO, "CoringFilter", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0311, AUTO, "CoringValues", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0600, AUTO, "BlackLevel2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0610, AUTO, "GainBase", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0611, AUTO, "ValidBits", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0612, AUTO, "CropLeft", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0613, AUTO, "CropTop", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0614, AUTO, "CropWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0615, AUTO, "CropHeight", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1010, AUTO, "NoiseReduction2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1011, AUTO, "DistortionCorrection2", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1012, AUTO, "ShadingCompensation2", &olOnOffInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x1103, AUTO, "UnknownBlock", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1200, AUTO, "FaceDetect", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1201, AUTO, "FaceDetectArea", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib olyRawDevelopmentAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "RawDevVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0100, AUTO, "RawDevExposureBiasValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0101, AUTO, "RawDevWhiteBalanceValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0102, AUTO, "RawDevWBFineAdjustment", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0103, AUTO, "RawDevGrayPoint", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "RawDevSaturationEmphasis", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0105, AUTO, "RawDevMemoryColorEmphasis", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0106, AUTO, "RawDevContrastValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0107, AUTO, "RawDevSharpnessValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0108, AUTO, "RawDevColorSpace", &olColorSpaceInterpreter}, - {0, AC_WRITE, 0, 0, 0x0109, AUTO, "RawDevEngine", &olDevEngineInterpreter}, - {0, AC_WRITE, 0, 0, 0x010a, AUTO, "RawDevNoiseReduction", &olNoiseReductionInterpreter}, - {0, AC_WRITE, 0, 0, 0x010b, AUTO, "RawDevEditStatus", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010c, AUTO, "RawDevSettings", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "RawDevVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0100, AUTO, "RawDevExposureBiasValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0101, AUTO, "RawDevWhiteBalanceValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0102, AUTO, "RawDevWBFineAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0103, AUTO, "RawDevGrayPoint", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "RawDevSaturationEmphasis", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0105, AUTO, "RawDevMemoryColorEmphasis", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0106, AUTO, "RawDevContrastValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0107, AUTO, "RawDevSharpnessValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0108, AUTO, "RawDevColorSpace", &olColorSpaceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0109, AUTO, "RawDevEngine", &olDevEngineInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010a, AUTO, "RawDevNoiseReduction", &olNoiseReductionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010b, AUTO, "RawDevEditStatus", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010c, AUTO, "RawDevSettings", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib olyRawDevelopment2Attribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "RawDevVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0100, AUTO, "RawDevExposureBiasValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0101, AUTO, "RawDevWhiteBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0102, AUTO, "RawDevWhiteBalanceValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0103, AUTO, "RawDevWBFineAdjustment", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "RawDevGrayPoint", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0105, AUTO, "RawDevContrastValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0106, AUTO, "RawDevSharpnessValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0107, AUTO, "RawDevSaturationEmphasis", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0108, AUTO, "RawDevMemoryColorEmphasis", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0109, AUTO, "RawDevColorSpace", &olColorSpaceInterpreter}, - {0, AC_WRITE, 0, 0, 0x010a, AUTO, "RawDevNoiseReduction", &olNoiseReductionInterpreter}, - {0, AC_WRITE, 0, 0, 0x010b, AUTO, "RawDevEngine", &olDevEngineInterpreter}, - {0, AC_WRITE, 0, 0, 0x010c, AUTO, "RawDevPictureMode", &olPictureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x010d, AUTO, "RawDevPMSaturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010e, AUTO, "RawDevPMContrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010f, AUTO, "RawDevPMSharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0110, AUTO, "RawDevPM_BWFilter", &olPictureModeBWFilterInterpreter}, - {0, AC_WRITE, 0, 0, 0x0111, AUTO, "RawDevPMPictureTone", &olPictureModeToneInterpreter}, - {0, AC_WRITE, 0, 0, 0x0112, AUTO, "RawDevGradation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0113, AUTO, "RawDevSaturation3", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0119, AUTO, "RawDevAutoGradation", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0120, AUTO, "RawDevPMNoiseFilter", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "RawDevVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0100, AUTO, "RawDevExposureBiasValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0101, AUTO, "RawDevWhiteBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0102, AUTO, "RawDevWhiteBalanceValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0103, AUTO, "RawDevWBFineAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "RawDevGrayPoint", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0105, AUTO, "RawDevContrastValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0106, AUTO, "RawDevSharpnessValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0107, AUTO, "RawDevSaturationEmphasis", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0108, AUTO, "RawDevMemoryColorEmphasis", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0109, AUTO, "RawDevColorSpace", &olColorSpaceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010a, AUTO, "RawDevNoiseReduction", &olNoiseReductionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010b, AUTO, "RawDevEngine", &olDevEngineInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010c, AUTO, "RawDevPictureMode", &olPictureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010d, AUTO, "RawDevPMSaturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010e, AUTO, "RawDevPMContrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010f, AUTO, "RawDevPMSharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0110, AUTO, "RawDevPM_BWFilter", &olPictureModeBWFilterInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0111, AUTO, "RawDevPMPictureTone", &olPictureModeToneInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0112, AUTO, "RawDevGradation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0113, AUTO, "RawDevSaturation3", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0119, AUTO, "RawDevAutoGradation", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0120, AUTO, "RawDevPMNoiseFilter", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib olyCameraSettingsAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "CameraSettingsVersion", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0100, AUTO, "PreviewImageValid", &olYesNoInterpreter}, - {1, AC_WRITE, 0, 0, 0x0101, AUTO, "PreviewImageStart", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0102, AUTO, "PreviewImageLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0200, AUTO, "ExposureMode", &olExposureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0201, AUTO, "AELock", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0202, AUTO, "MeteringMode", &olMeteringModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0300, AUTO, "MacroMode", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0301, AUTO, "FocusMode", &olFocusModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0302, AUTO, "FocusProcess", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0303, AUTO, "AFSearch", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0304, AUTO, "AFAreas", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0400, AUTO, "FlashMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0401, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0500, AUTO, "WhiteBalance2", &olWhitebalance2Interpreter}, - {0, AC_WRITE, 0, 0, 0x0501, AUTO, "WhiteBalanceTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0502, AUTO, "WhiteBalanceBracket", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0503, AUTO, "CustomSaturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0504, AUTO, "ModifiedSaturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0505, AUTO, "ContrastSetting", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0506, AUTO, "SharpnessSetting", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0507, AUTO, "ColorSpace", &olColorSpaceInterpreter}, - {0, AC_WRITE, 0, 0, 0x0509, AUTO, "SceneMode", &olSceneModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x050a, AUTO, "NoiseReduction", &olNoiseReductionInterpreter}, - {0, AC_WRITE, 0, 0, 0x050b, AUTO, "DistortionCorrection", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x050c, AUTO, "ShadingCompensation", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x050d, AUTO, "CompressionFactor", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x050f, AUTO, "Gradation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0520, AUTO, "PictureMode", &olPictureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0521, AUTO, "PictureModeSaturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0522, AUTO, "PictureModeHue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0523, AUTO, "PictureModeContrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0524, AUTO, "PictureModeSharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0525, AUTO, "PictureModeBWFilter", &olPictureModeBWFilterInterpreter}, - {0, AC_WRITE, 0, 0, 0x0526, AUTO, "PictureModeTone", &olPictureModeToneInterpreter}, - {0, AC_WRITE, 0, 0, 0x0527, AUTO, "NoiseFilter", &olNoiseFilterInterpreter}, - {0, AC_WRITE, 0, 0, 0x0600, AUTO, "DriveMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0601, AUTO, "PanoramaMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0603, AUTO, "ImageQuality2", &olImageQuality2Interpreter}, - {0, AC_WRITE, 0, 0, 0x0900, AUTO, "ManometerPressure", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0901, AUTO, "ManometerReading", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0902, AUTO, "ExtendedWBDetect", &olOnOffInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "CameraSettingsVersion", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0100, AUTO, "PreviewImageValid", &olYesNoInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0101, AUTO, "PreviewImageStart", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0102, AUTO, "PreviewImageLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0200, AUTO, "ExposureMode", &olExposureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0201, AUTO, "AELock", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0202, AUTO, "MeteringMode", &olMeteringModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0300, AUTO, "MacroMode", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0301, AUTO, "FocusMode", &olFocusModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0302, AUTO, "FocusProcess", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0303, AUTO, "AFSearch", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0304, AUTO, "AFAreas", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0400, AUTO, "FlashMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0401, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0500, AUTO, "WhiteBalance2", &olWhitebalance2Interpreter}, + {0, AC_WRITE, 0, nullptr, 0x0501, AUTO, "WhiteBalanceTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0502, AUTO, "WhiteBalanceBracket", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0503, AUTO, "CustomSaturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0504, AUTO, "ModifiedSaturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0505, AUTO, "ContrastSetting", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0506, AUTO, "SharpnessSetting", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0507, AUTO, "ColorSpace", &olColorSpaceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0509, AUTO, "SceneMode", &olSceneModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x050a, AUTO, "NoiseReduction", &olNoiseReductionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x050b, AUTO, "DistortionCorrection", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x050c, AUTO, "ShadingCompensation", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x050d, AUTO, "CompressionFactor", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x050f, AUTO, "Gradation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0520, AUTO, "PictureMode", &olPictureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0521, AUTO, "PictureModeSaturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0522, AUTO, "PictureModeHue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0523, AUTO, "PictureModeContrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0524, AUTO, "PictureModeSharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0525, AUTO, "PictureModeBWFilter", &olPictureModeBWFilterInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0526, AUTO, "PictureModeTone", &olPictureModeToneInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0527, AUTO, "NoiseFilter", &olNoiseFilterInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0600, AUTO, "DriveMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0601, AUTO, "PanoramaMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0603, AUTO, "ImageQuality2", &olImageQuality2Interpreter}, + {0, AC_WRITE, 0, nullptr, 0x0900, AUTO, "ManometerPressure", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0901, AUTO, "ManometerReading", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0902, AUTO, "ExtendedWBDetect", &olOnOffInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib olyEquipmentAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "EquipmentVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0100, AUTO, "CameraType2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0101, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0102, AUTO, "InternalSerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0103, AUTO, "FocalPlaneDiagonal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "BodyFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0201, AUTO, "LensType", &olLensTypeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0202, AUTO, "LensSerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0204, AUTO, "LensFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0205, AUTO, "MaxApertureAtMinFocal", &olApertureInterpreter}, - {0, AC_WRITE, 0, 0, 0x0206, AUTO, "MaxApertureAtMaxFocal", &olApertureInterpreter}, - {0, AC_WRITE, 0, 0, 0x0207, AUTO, "MinFocalLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0208, AUTO, "MaxFocalLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020a, AUTO, "MaxApertureAtCurrentFocal", &olApertureInterpreter}, - {0, AC_WRITE, 0, 0, 0x020b, AUTO, "LensProperties", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0301, AUTO, "Extender", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0302, AUTO, "ExtenderSerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0303, AUTO, "ExtenderModel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0304, AUTO, "ExtenderFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1000, AUTO, "FlashType", &olFlashTypeInterpreter}, - {0, AC_WRITE, 0, 0, 0x1001, AUTO, "FlashModel", &olFlashModelInterpreter}, - {0, AC_WRITE, 0, 0, 0x1002, AUTO, "FlashFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1003, AUTO, "FlashSerialNumber", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "EquipmentVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0100, AUTO, "CameraType2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0101, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0102, AUTO, "InternalSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0103, AUTO, "FocalPlaneDiagonal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "BodyFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0201, AUTO, "LensType", &olLensTypeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0202, AUTO, "LensSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0204, AUTO, "LensFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0205, AUTO, "MaxApertureAtMinFocal", &olApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0206, AUTO, "MaxApertureAtMaxFocal", &olApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0207, AUTO, "MinFocalLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0208, AUTO, "MaxFocalLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020a, AUTO, "MaxApertureAtCurrentFocal", &olApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020b, AUTO, "LensProperties", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0301, AUTO, "Extender", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0302, AUTO, "ExtenderSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0303, AUTO, "ExtenderModel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0304, AUTO, "ExtenderFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1000, AUTO, "FlashType", &olFlashTypeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1001, AUTO, "FlashModel", &olFlashModelInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1002, AUTO, "FlashFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1003, AUTO, "FlashSerialNumber", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib olympusAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "BodyFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0200, AUTO, "SpecialMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0201, AUTO, "Quality", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0202, AUTO, "Macro", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0203, AUTO, "BWMode", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0204, AUTO, "DigitalZoom", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0205, AUTO, "FocalPlaneDiagonal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0206, AUTO, "LensDistortionParams", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0207, AUTO, "CameraType", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0208, AUTO, "TextInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0209, AUTO, "CameraID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020b, AUTO, "EpsonImageWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020c, AUTO, "EpsonImageHeight", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020d, AUTO, "EpsonSoftware", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0280, AUTO, "PreviewImage", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0300, AUTO, "PreCaptureFrames", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0301, AUTO, "WhiteBoard", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0302, AUTO, "OneTouchWB", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0303, AUTO, "WhiteBalanceBracket", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0304, AUTO, "WhiteBalanceBias", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0403, AUTO, "SceneMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0404, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0405, AUTO, "Firmware", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0f00, AUTO, "DataDump", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0f01, AUTO, "DataDump2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1000, AUTO, "ShutterSpeedValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1001, AUTO, "ISOValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1002, AUTO, "ApertureValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1003, AUTO, "BrightnessValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1004, AUTO, "FlashMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1005, AUTO, "FlashDevice", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1006, AUTO, "ExposureCompensation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1007, AUTO, "SensorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1008, AUTO, "LensTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1009, AUTO, "LightCondition", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100a, AUTO, "FocusRange", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100b, AUTO, "FocusMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100c, AUTO, "ManualFocusDistance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100d, AUTO, "ZoomStepCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100e, AUTO, "FocusStepCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x100f, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1010, AUTO, "FlashChargeLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1011, AUTO, "ColorMatrix", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1012, AUTO, "BlackLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1013, AUTO, "ColorTemperatureBG", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1014, AUTO, "ColorTemperatureRG", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1015, AUTO, "WBMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1017, AUTO, "RedBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1018, AUTO, "BlueBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1019, AUTO, "ColorMatrixNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x101a, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x101b, AUTO, "ExternalFlashAE1_0", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x101c, AUTO, "ExternalFlashAE2_0", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x101d, AUTO, "InternalFlashAE1_0", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x101e, AUTO, "InternalFlashAE2_0", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x101f, AUTO, "ExternalFlashAE1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1020, AUTO, "ExternalFlashAE2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1021, AUTO, "InternalFlashAE1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1022, AUTO, "InternalFlashAE2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1023, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1024, AUTO, "InternalFlashTable", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1025, AUTO, "ExternalFlashGValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1026, AUTO, "ExternalFlashBounce", &olYesNoInterpreter}, - {0, AC_WRITE, 0, 0, 0x1027, AUTO, "ExternalFlashZoom", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1028, AUTO, "ExternalFlashMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1029, AUTO, "Contrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x102a, AUTO, "SharpnessFactor", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x102b, AUTO, "ColorControl", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x102c, AUTO, "ValidBits", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x102d, AUTO, "CoringFilter", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x102e, AUTO, "OlympusImageWidth", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x102f, AUTO, "OlympusImageHeight", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1030, AUTO, "SceneDetect", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1031, AUTO, "SceneArea", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1033, AUTO, "SceneDetectData", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1034, AUTO, "CompressionRatio", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x1035, AUTO, "PreviewImageValid", &olYesNoInterpreter}, - {1, AC_WRITE, 0, 0, 0x1036, AUTO, "PreviewImageStart", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x1037, AUTO, "PreviewImageLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1038, AUTO, "AFResult", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x1039, AUTO, "CCDScanMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x103a, AUTO, "NoiseReduction", &olOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x103b, AUTO, "InfinityLensStep", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x103c, AUTO, "NearLensStep", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x103d, AUTO, "LightValueCenter", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x103e, AUTO, "LightValuePeriphery", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x103f, AUTO, "FieldCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "BodyFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0200, AUTO, "SpecialMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0201, AUTO, "Quality", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0202, AUTO, "Macro", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0203, AUTO, "BWMode", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0204, AUTO, "DigitalZoom", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0205, AUTO, "FocalPlaneDiagonal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0206, AUTO, "LensDistortionParams", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0207, AUTO, "CameraType", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0208, AUTO, "TextInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0209, AUTO, "CameraID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020b, AUTO, "EpsonImageWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020c, AUTO, "EpsonImageHeight", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020d, AUTO, "EpsonSoftware", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0280, AUTO, "PreviewImage", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0300, AUTO, "PreCaptureFrames", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0301, AUTO, "WhiteBoard", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0302, AUTO, "OneTouchWB", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0303, AUTO, "WhiteBalanceBracket", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0304, AUTO, "WhiteBalanceBias", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0403, AUTO, "SceneMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0404, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0405, AUTO, "Firmware", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0f00, AUTO, "DataDump", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0f01, AUTO, "DataDump2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1000, AUTO, "ShutterSpeedValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1001, AUTO, "ISOValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1002, AUTO, "ApertureValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1003, AUTO, "BrightnessValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1004, AUTO, "FlashMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1005, AUTO, "FlashDevice", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1006, AUTO, "ExposureCompensation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1007, AUTO, "SensorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1008, AUTO, "LensTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1009, AUTO, "LightCondition", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100a, AUTO, "FocusRange", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100b, AUTO, "FocusMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100c, AUTO, "ManualFocusDistance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100d, AUTO, "ZoomStepCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100e, AUTO, "FocusStepCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x100f, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1010, AUTO, "FlashChargeLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1011, AUTO, "ColorMatrix", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1012, AUTO, "BlackLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1013, AUTO, "ColorTemperatureBG", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1014, AUTO, "ColorTemperatureRG", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1015, AUTO, "WBMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1017, AUTO, "RedBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1018, AUTO, "BlueBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1019, AUTO, "ColorMatrixNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x101a, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x101b, AUTO, "ExternalFlashAE1_0", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x101c, AUTO, "ExternalFlashAE2_0", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x101d, AUTO, "InternalFlashAE1_0", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x101e, AUTO, "InternalFlashAE2_0", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x101f, AUTO, "ExternalFlashAE1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1020, AUTO, "ExternalFlashAE2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1021, AUTO, "InternalFlashAE1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1022, AUTO, "InternalFlashAE2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1023, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1024, AUTO, "InternalFlashTable", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1025, AUTO, "ExternalFlashGValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1026, AUTO, "ExternalFlashBounce", &olYesNoInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1027, AUTO, "ExternalFlashZoom", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1028, AUTO, "ExternalFlashMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1029, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x102a, AUTO, "SharpnessFactor", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x102b, AUTO, "ColorControl", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x102c, AUTO, "ValidBits", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x102d, AUTO, "CoringFilter", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x102e, AUTO, "OlympusImageWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x102f, AUTO, "OlympusImageHeight", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1030, AUTO, "SceneDetect", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1031, AUTO, "SceneArea", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1033, AUTO, "SceneDetectData", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1034, AUTO, "CompressionRatio", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x1035, AUTO, "PreviewImageValid", &olYesNoInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x1036, AUTO, "PreviewImageStart", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x1037, AUTO, "PreviewImageLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1038, AUTO, "AFResult", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x1039, AUTO, "CCDScanMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x103a, AUTO, "NoiseReduction", &olOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x103b, AUTO, "InfinityLensStep", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x103c, AUTO, "NearLensStep", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x103d, AUTO, "LightValueCenter", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x103e, AUTO, "LightValuePeriphery", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x103f, AUTO, "FieldCount", &stdInterpreter}, {0, AC_WRITE, 0, olyEquipmentAttribs, 0x2010, AUTO, "Equipment", &stdInterpreter}, {0, AC_WRITE, 0, olyCameraSettingsAttribs, 0x2020, AUTO, "CameraSettings", &stdInterpreter}, {0, AC_WRITE, 0, olyRawDevelopmentAttribs, 0x2030, AUTO, "RawDevelopment", &stdInterpreter}, {0, AC_WRITE, 0, olyRawDevelopment2Attribs, 0x2031, AUTO, "RawDev2", &stdInterpreter}, {0, AC_WRITE, 0, olyImageProcessingAttribs, 0x2040, AUTO, "ImageProcessing", &stdInterpreter}, {0, AC_WRITE, 0, olyFocusInfoAttribs, 0x2050, AUTO, "FocusInfo", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2100, AUTO, "Olympus2100", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2300, AUTO, "Olympus2300", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2400, AUTO, "Olympus2400", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2500, AUTO, "Olympus2500", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2600, AUTO, "Olympus2600", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2700, AUTO, "Olympus2700", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2800, AUTO, "Olympus2800", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2900, AUTO, "Olympus2900", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x3000, AUTO, "RawInfo", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {1, AC_WRITE, 0, nullptr, 0x2100, AUTO, "Olympus2100", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2300, AUTO, "Olympus2300", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2400, AUTO, "Olympus2400", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2500, AUTO, "Olympus2500", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2600, AUTO, "Olympus2600", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2700, AUTO, "Olympus2700", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2800, AUTO, "Olympus2800", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2900, AUTO, "Olympus2900", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x3000, AUTO, "RawInfo", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; } #endif diff --git a/rtexif/pentaxattribs.cc b/rtexif/pentaxattribs.cc index f88e650ec..9fc6b6fb6 100644 --- a/rtexif/pentaxattribs.cc +++ b/rtexif/pentaxattribs.cc @@ -980,7 +980,7 @@ public: } virtual std::string toString (Tag* t) { - double *liArray = NULL; + double *liArray = nullptr; double maxApertureAtFocal = 0.; double focalLength = 0.; int lensID = 256 * t->toInt(0, BYTE) + t->toInt(1, BYTE); @@ -1911,12 +1911,12 @@ public: PAAFPointSelectedInterpreter() {} virtual std::string toString (Tag* t) { - const char *ps[] = {"Upper-left", "Top", "Upper-right", "Left", "Mid-left", "Center", "Mid-right", "Right", "Lower-left", "Bottom", "Lower-right"}; int c = t->toInt(0, SHORT); if( !c ) { return "Auto"; } else { + const char *ps[] = {"Upper-left", "Top", "Upper-right", "Left", "Mid-left", "Center", "Mid-right", "Right", "Lower-left", "Bottom", "Lower-right"}; for( int iBit = 0; iBit < 11; iBit++) if( c & (1 << iBit) ) { return ps[iBit]; @@ -1962,236 +1962,236 @@ public: PADriveMode2Interpreter paDriveMode2Interpreter; const TagAttrib pentaxAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "PentaxVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0001, AUTO, "PentaxModelType", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0002, AUTO, "PreviewImageSize", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0003, AUTO, "PreviewImageLength", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0004, AUTO, "PreviewImageStart", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0005, AUTO, "PentaxModelID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0006, AUTO, "Date", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0007, AUTO, "Time", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0008, AUTO, "Quality", &paQualityInterpreter}, - {0, AC_WRITE, 0, 0, 0x0009, AUTO, "PentaxImageSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000b, AUTO, "PictureMode", &paPictureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x000c, AUTO, "FlashMode", &paFlashModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x000d, AUTO, "FocusMode", &paFocusModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x000e, AUTO, "AFPointSelected", &paAFPointInterpreter}, - {0, AC_WRITE, 0, 0, 0x000f, AUTO, "AFPointsInFocus", &paAFFocusInterpreter}, - {0, AC_WRITE, 0, 0, 0x0010, AUTO, "FocusPosition", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0012, AUTO, "ExposureTime", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0013, AUTO, "FNumber", &paFNumberInterpreter}, - {0, AC_WRITE, 0, 0, 0x0014, AUTO, "ISO", &paISOInterpreter}, - {0, AC_WRITE, 0, 0, 0x0015, AUTO, "LightReading", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0016, AUTO, "ExposureCompensation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0017, AUTO, "MeteringMode", &paMeteringModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0018, AUTO, "AutoBracketing", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0019, AUTO, "WhiteBalance", &paWhiteBalanceInterpreter}, - {0, AC_WRITE, 0, 0, 0x001a, AUTO, "WhiteBalanceMode", &paWhiteBalanceModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x001b, AUTO, "BlueBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001c, AUTO, "RedBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001d, AUTO, "FocalLength", &paFocalLengthInterpreter}, - {0, AC_WRITE, 0, 0, 0x001e, AUTO, "DigitalZoom", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001f, AUTO, "Saturation", &paSaturationInterpreter}, - {0, AC_WRITE, 0, 0, 0x0020, AUTO, "Contrast", &paContrastInterpreter}, - {0, AC_WRITE, 0, 0, 0x0021, AUTO, "Sharpness", &paSharpnessInterpreter}, - {0, AC_WRITE, 0, 0, 0x0022, AUTO, "WorldTimeLocation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0023, AUTO, "HometownCity", &stdInterpreter}, - {0, AC_NEW, 0, 0, 0x0024, AUTO, "DestinationCity", &stdInterpreter}, - {0, AC_NEW, 0, 0, 0x0025, AUTO, "HometownDST", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0026, AUTO, "DestinationDST", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0027, AUTO, "DSPFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0028, AUTO, "CPUFirmwareVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0029, AUTO, "FrameNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x002d, AUTO, "EffectiveLV", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0032, AUTO, "ImageProcessing", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0033, AUTO, "PictureMode", &paPictureModeInterpreter2}, - {0, AC_WRITE, 0, 0, 0x0034, AUTO, "DriveMode", &paDriveModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0037, AUTO, "ColorSpace", &paColorSpaceInterpreter}, - {0, AC_WRITE, 0, 0, 0x0038, AUTO, "ImageAreaOffset", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0039, AUTO, "RawImageSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x003c, AUTO, "AFPointsInFocus", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x003e, AUTO, "PreviewImageBorders", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x003f, AUTO, "LensType", &paLensTypeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0040, AUTO, "SensitivityAdjust", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0041, AUTO, "ImageProcessingCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0047, AUTO, "CameraTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0048, AUTO, "AELock", &paOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0049, AUTO, "NoiseReduction", &paOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x004d, AUTO, "FlashExposureComp", &paFlashExposureCompInterpreter}, - {0, AC_WRITE, 0, 0, 0x004f, AUTO, "ImageTone", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0050, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "PentaxVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "PentaxModelType", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0002, AUTO, "PreviewImageSize", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0003, AUTO, "PreviewImageLength", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0004, AUTO, "PreviewImageStart", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0005, AUTO, "PentaxModelID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0006, AUTO, "Date", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0007, AUTO, "Time", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0008, AUTO, "Quality", &paQualityInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0009, AUTO, "PentaxImageSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000b, AUTO, "PictureMode", &paPictureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000c, AUTO, "FlashMode", &paFlashModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000d, AUTO, "FocusMode", &paFocusModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000e, AUTO, "AFPointSelected", &paAFPointInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000f, AUTO, "AFPointsInFocus", &paAFFocusInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0010, AUTO, "FocusPosition", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0012, AUTO, "ExposureTime", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0013, AUTO, "FNumber", &paFNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0014, AUTO, "ISO", &paISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0015, AUTO, "LightReading", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0016, AUTO, "ExposureCompensation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0017, AUTO, "MeteringMode", &paMeteringModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0018, AUTO, "AutoBracketing", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0019, AUTO, "WhiteBalance", &paWhiteBalanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001a, AUTO, "WhiteBalanceMode", &paWhiteBalanceModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001b, AUTO, "BlueBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001c, AUTO, "RedBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001d, AUTO, "FocalLength", &paFocalLengthInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001e, AUTO, "DigitalZoom", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001f, AUTO, "Saturation", &paSaturationInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0020, AUTO, "Contrast", &paContrastInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0021, AUTO, "Sharpness", &paSharpnessInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0022, AUTO, "WorldTimeLocation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0023, AUTO, "HometownCity", &stdInterpreter}, + {0, AC_NEW, 0, nullptr, 0x0024, AUTO, "DestinationCity", &stdInterpreter}, + {0, AC_NEW, 0, nullptr, 0x0025, AUTO, "HometownDST", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0026, AUTO, "DestinationDST", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0027, AUTO, "DSPFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0028, AUTO, "CPUFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0029, AUTO, "FrameNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x002d, AUTO, "EffectiveLV", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0032, AUTO, "ImageProcessing", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0033, AUTO, "PictureMode", &paPictureModeInterpreter2}, + {0, AC_WRITE, 0, nullptr, 0x0034, AUTO, "DriveMode", &paDriveModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0037, AUTO, "ColorSpace", &paColorSpaceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0038, AUTO, "ImageAreaOffset", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0039, AUTO, "RawImageSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x003c, AUTO, "AFPointsInFocus", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x003e, AUTO, "PreviewImageBorders", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x003f, AUTO, "LensType", &paLensTypeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0040, AUTO, "SensitivityAdjust", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0041, AUTO, "ImageProcessingCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0047, AUTO, "CameraTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0048, AUTO, "AELock", &paOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0049, AUTO, "NoiseReduction", &paOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x004d, AUTO, "FlashExposureComp", &paFlashExposureCompInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x004f, AUTO, "ImageTone", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0050, AUTO, "ColorTemperature", &stdInterpreter}, {0, AC_WRITE, 0, pentaxSRInfoAttribs, 0x005c, AUTO, "ShakeReductionInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x005d, AUTO, "ShutterCount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0069, AUTO, "DynamicRangeExpansion", &paOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0071, AUTO, "HighISONoiseReduction", &paHighISONoiseInterpreter}, - {0, AC_WRITE, 0, 0, 0x0072, AUTO, "AFAdjustment", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0073, AUTO, "MonochromeFilterEffect", &paMonochromeFilterEffectInterpreter}, - {0, AC_WRITE, 0, 0, 0x0074, AUTO, "MonochromeToning", &paMonochromeToningInterpreter}, - {0, AC_WRITE, 0, 0, 0x0076, AUTO, "FaceDetect", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0077, AUTO, "FaceDetectFrameSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0079, AUTO, "ShadowCorrection", &paShadowCorrectionInterpreter}, - {0, AC_WRITE, 0, 0, 0x007a, AUTO, "ISOAutoParameters", &paISOAutoParametersInterpreter}, - {0, AC_WRITE, 0, 0, 0x007b, AUTO, "CrossProcess", &paCrossProcessInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x005d, AUTO, "ShutterCount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0069, AUTO, "DynamicRangeExpansion", &paOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0071, AUTO, "HighISONoiseReduction", &paHighISONoiseInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0072, AUTO, "AFAdjustment", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0073, AUTO, "MonochromeFilterEffect", &paMonochromeFilterEffectInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0074, AUTO, "MonochromeToning", &paMonochromeToningInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0076, AUTO, "FaceDetect", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0077, AUTO, "FaceDetectFrameSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0079, AUTO, "ShadowCorrection", &paShadowCorrectionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x007a, AUTO, "ISOAutoParameters", &paISOAutoParametersInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x007b, AUTO, "CrossProcess", &paCrossProcessInterpreter}, {0, AC_WRITE, 0, pentaxLensCorrAttribs, 0x007d, AUTO, "LensCorr", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x007f, AUTO, "BleachBypassToning", &paBleachBypassToningInterpreter}, - {0, AC_WRITE, 0, 0, 0x0082, AUTO, "BlurControl", &paBlurControlInterpreter}, - {0, AC_WRITE, 0, 0, 0x0085, AUTO, "HDR", &paHDRInterpreter}, - {0, AC_WRITE, 0, 0, 0x0088, AUTO, "NeutralDensityFilter", &paOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x008b, AUTO, "ISO", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0200, AUTO, "BlackPoint", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0201, AUTO, "WhitePoint", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0203, AUTO, "ColorMatrixA", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0204, AUTO, "ColorMatrixB", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x007f, AUTO, "BleachBypassToning", &paBleachBypassToningInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0082, AUTO, "BlurControl", &paBlurControlInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0085, AUTO, "HDR", &paHDRInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0088, AUTO, "NeutralDensityFilter", &paOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008b, AUTO, "ISO", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0200, AUTO, "BlackPoint", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0201, AUTO, "WhitePoint", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0203, AUTO, "ColorMatrixA", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0204, AUTO, "ColorMatrixB", &stdInterpreter}, {0, AC_WRITE, 0, pentaxCameraSettingsAttribs, 0x0205, AUTO, "CameraSettings", &stdInterpreter}, {0, AC_WRITE, 0, pentaxAEInfoAttribs, 0x0206, AUTO, "AEInfo", &stdInterpreter}, {0, AC_WRITE, 0, pentaxLensDataAttribs, 0x0207, AUTO, "LensInfo", &stdInterpreter}, {0, AC_WRITE, 0, pentaxFlashInfoAttribs, 0x0208, AUTO, "FlashInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0209, AUTO, "AEMeteringSegments", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020a, AUTO, "FlashADump", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020b, AUTO, "FlashBDump", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020d, AUTO, "WB_RGGBLevelsDaylight", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020e, AUTO, "WB_RGGBLevelsShade", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x020f, AUTO, "WB_RGGBLevelsCloudy", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0210, AUTO, "WB_RGGBLevelsTungsten", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0211, AUTO, "WB_RGGBLevelsFluorescentD", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0212, AUTO, "WB_RGGBLevelsFluorescentN", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0213, AUTO, "WB_RGGBLevelsFluorescentW", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0214, AUTO, "WB_RGGBLevelsFlash", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0209, AUTO, "AEMeteringSegments", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020a, AUTO, "FlashADump", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020b, AUTO, "FlashBDump", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020d, AUTO, "WB_RGGBLevelsDaylight", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020e, AUTO, "WB_RGGBLevelsShade", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x020f, AUTO, "WB_RGGBLevelsCloudy", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0210, AUTO, "WB_RGGBLevelsTungsten", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0211, AUTO, "WB_RGGBLevelsFluorescentD", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0212, AUTO, "WB_RGGBLevelsFluorescentN", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0213, AUTO, "WB_RGGBLevelsFluorescentW", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0214, AUTO, "WB_RGGBLevelsFlash", &stdInterpreter}, {0, AC_WRITE, 0, pentaxCameraInfoAttribs, 0x0215, AUTO, "CameraInfo", &stdInterpreter}, {0, AC_WRITE, 0, pentaxBatteryInfoAttribs, 0x0216, AUTO, "BatteryInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x021f, AUTO, "AFInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0222, AUTO, "ColorInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x021f, AUTO, "AFInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0222, AUTO, "ColorInfo", &stdInterpreter}, {0, AC_WRITE, 0, pentaxLensInfoQAttribs, 0x0239, AUTO, "LensInfoQ", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03fe, AUTO, "DataDump", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x03ff, AUTO, "UnknownInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0402, AUTO, "ToneCurve", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0403, AUTO, "ToneCurves", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x03fe, AUTO, "DataDump", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x03ff, AUTO, "UnknownInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0402, AUTO, "ToneCurve", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0403, AUTO, "ToneCurves", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxSRInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "SRResult", &paSRResultInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "ShakeReduction", &paShakeReductionInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "SRHalfPressTime", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "SRFocalLength", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "SRResult", &paSRResultInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ShakeReduction", &paShakeReductionInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "SRHalfPressTime", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "SRFocalLength", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxSRInfo2Attribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "SRResult", &paSRResultInterpreter}, // assuming it's the same interpreter, but that's not sure - {0, AC_WRITE, 0, 0, 1, AUTO, "ShakeReduction", &paShakeReduction2Interpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "SRResult", &paSRResultInterpreter}, // assuming it's the same interpreter, but that's not sure + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ShakeReduction", &paShakeReduction2Interpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxLensDataAttribs[] = { - {0, AC_WRITE, 0, 0, 9, AUTO, "FocalLength", &paLensDataFocalLengthInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "NominalMaxAperture", &paNominalMaxApertureInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "NominalMinAperture", &paNominalMinApertureInterpreter}, - {0, AC_WRITE, 0, 0, 14, AUTO, "MaxAperture", &paMaxApertureInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 9, AUTO, "FocalLength", &paLensDataFocalLengthInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "NominalMaxAperture", &paNominalMaxApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "NominalMinAperture", &paNominalMinApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 14, AUTO, "MaxAperture", &paMaxApertureInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxLensInfoQAttribs[] = { - {0, AC_WRITE, 0, 0, 12, AUTO, "LensModel", &paLensModelQInterpreter}, - {0, AC_WRITE, 0, 0, 42, AUTO, "LensInfo", &paLensInfoQInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 12, AUTO, "LensModel", &paLensModelQInterpreter}, + {0, AC_WRITE, 0, nullptr, 42, AUTO, "LensInfo", &paLensInfoQInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxLensCorrAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "DistortionCorrection", &paOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "ChromaticAberrationCorrection", &paOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "VignettingCorrection", &paOnOffInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "DistortionCorrection", &paOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ChromaticAberrationCorrection", &paOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "VignettingCorrection", &paOnOffInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxCameraSettingsAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "PictureMode2", &paPictureMode2Interpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "ProgramLine", &paProgramLineInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "EVSteps", &paEVStepsInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "E-DialinProgram", &paEDialinInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "ApertureRing", &paApertureRingUseInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "FlashOptions", &paFlashOptionInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "MeteringMode2", &paMeteringMode2Interpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "AFMode", &paAFModeInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "AFPointSelected2", &paAFPointSelectedInterpreter}, - {0, AC_WRITE, 0, 0, 7, AUTO, "DriveMode2", &paDriveMode2Interpreter}, - {0, AC_WRITE, 0, 0, 8, AUTO, "ExposureBracketStepSize", &paExposureBracketStepSizeInterpreter}, - {0, AC_WRITE, 0, 0, 9, AUTO, "BracketShotNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "WhiteBalanceSet", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "PictureMode2", &paPictureMode2Interpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ProgramLine", &paProgramLineInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "EVSteps", &paEVStepsInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "E-DialinProgram", &paEDialinInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ApertureRing", &paApertureRingUseInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "FlashOptions", &paFlashOptionInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "MeteringMode2", &paMeteringMode2Interpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "AFMode", &paAFModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "AFPointSelected2", &paAFPointSelectedInterpreter}, + {0, AC_WRITE, 0, nullptr, 7, AUTO, "DriveMode2", &paDriveMode2Interpreter}, + {0, AC_WRITE, 0, nullptr, 8, AUTO, "ExposureBracketStepSize", &paExposureBracketStepSizeInterpreter}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "BracketShotNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "WhiteBalanceSet", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxAEInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "AEExposureTime", &paExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "AEAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "AE_ISO", &paISOfInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "AEXv", &paAEXvInterpreter}, - {0, AC_WRITE, 0, 0, 4, SBYTE, "AEBXv", &paAEBXvInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "AEMinExposureTime", &paExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 6, AUTO, "AEProgramMode", &paAEProgramModeInterpreter}, - {0, AC_WRITE, 0, 0, 9, AUTO, "AEMaxAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 10, AUTO, "AEMaxAperture2", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 11, AUTO, "AEMinAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 12, AUTO, "AEMeteringMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 14, SBYTE, "FlashExposureCompSet", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "AEExposureTime", &paExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "AEAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "AE_ISO", &paISOfInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "AEXv", &paAEXvInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, SBYTE, "AEBXv", &paAEBXvInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "AEMinExposureTime", &paExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 6, AUTO, "AEProgramMode", &paAEProgramModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "AEMaxAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "AEMaxAperture2", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 11, AUTO, "AEMinAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 12, AUTO, "AEMeteringMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 14, SBYTE, "FlashExposureCompSet", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxAEInfo2Attribs[] = { - {0, AC_WRITE, 0, 0, 2, AUTO, "AEExposureTime", &paExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "AEAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "AE_ISO", &paISOfInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "AEXv", &paAEXvInterpreter}, - {0, AC_WRITE, 0, 0, 6, SBYTE, "AEBXv", &paAEBXvInterpreter}, - {0, AC_WRITE, 0, 0, 8, SBYTE, "AEError", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "AEExposureTime", &paExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "AEAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "AE_ISO", &paISOfInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "AEXv", &paAEXvInterpreter}, + {0, AC_WRITE, 0, nullptr, 6, SBYTE, "AEBXv", &paAEBXvInterpreter}, + {0, AC_WRITE, 0, nullptr, 8, SBYTE, "AEError", &stdInterpreter}, //{0, AC_WRITE, 0, 0, 11, AUTO, "AEApertureSteps", &}, - {0, AC_WRITE, 0, 0, 15, AUTO, "SceneMode", &paSceneModeInterpreter}, - {0, AC_WRITE, 0, 0, 16, AUTO, "AEMaxAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 17, AUTO, "AEMaxAperture2", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 18, AUTO, "AEMinAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 19, AUTO, "AEMinExposureTime", &paExposureTimeInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 15, AUTO, "SceneMode", &paSceneModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 16, AUTO, "AEMaxAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "AEMaxAperture2", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 18, AUTO, "AEMinAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 19, AUTO, "AEMinExposureTime", &paExposureTimeInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxAEInfo3Attribs[] = { - {0, AC_WRITE, 0, 0, 16, AUTO, "AEExposureTime", &paExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 17, AUTO, "AEAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 18, AUTO, "AE_ISO", &paISOfInterpreter}, - {0, AC_WRITE, 0, 0, 28, AUTO, "AEMaxAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 29, AUTO, "AEMaxAperture2", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 30, AUTO, "AEMinAperture", &paApertureInterpreter}, - {0, AC_WRITE, 0, 0, 31, AUTO, "AEMinExposureTime", &paExposureTimeInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 16, AUTO, "AEExposureTime", &paExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "AEAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 18, AUTO, "AE_ISO", &paISOfInterpreter}, + {0, AC_WRITE, 0, nullptr, 28, AUTO, "AEMaxAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 29, AUTO, "AEMaxAperture2", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 30, AUTO, "AEMinAperture", &paApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 31, AUTO, "AEMinExposureTime", &paExposureTimeInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxFlashInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "FlashStatus", &paFlashStatusInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "InternalFlashMode", &paInternalFlashModeInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "ExternalFlashMode", &paExternalFlashModeInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "InternalFlashStrength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 24, AUTO, "ExternalFlashGuideNumber", &paExternalFlashGNInterpreter}, - {0, AC_WRITE, 0, 0, 25, AUTO, "ExternalFlashExposureComp", &paExternalFlashExposureCompInterpreter}, - {0, AC_WRITE, 0, 0, 26, AUTO, "ExternalFlashBounce", &paExternalFlashBounceInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "FlashStatus", &paFlashStatusInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "InternalFlashMode", &paInternalFlashModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "ExternalFlashMode", &paExternalFlashModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "InternalFlashStrength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 24, AUTO, "ExternalFlashGuideNumber", &paExternalFlashGNInterpreter}, + {0, AC_WRITE, 0, nullptr, 25, AUTO, "ExternalFlashExposureComp", &paExternalFlashExposureCompInterpreter}, + {0, AC_WRITE, 0, nullptr, 26, AUTO, "ExternalFlashBounce", &paExternalFlashBounceInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxBatteryInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "PowerSource", &paPowerSourceInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "BatteryStates", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "BatteryADBodyNoLoad", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "BatteryADBodyLoad", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "BatteryADGripNoLoad", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 5, AUTO, "BatteryADGripLoad", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "PowerSource", &paPowerSourceInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "BatteryStates", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "BatteryADBodyNoLoad", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "BatteryADBodyLoad", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "BatteryADGripNoLoad", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "BatteryADGripLoad", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib pentaxCameraInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "PentaxModelID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "ManufactureDate", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "ProductionCode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "InternalSerialNumber", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "PentaxModelID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ManufactureDate", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "ProductionCode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "InternalSerialNumber", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; } diff --git a/rtexif/rtexif.cc b/rtexif/rtexif.cc index 91f52ce55..64ddd0ee3 100644 --- a/rtexif/rtexif.cc +++ b/rtexif/rtexif.cc @@ -47,7 +47,7 @@ Interpreter stdInterpreter; #define TAG_SUBFILETYPE 0x00fe TagDirectory::TagDirectory () - : attribs(ifdAttribs), order(HOSTORDER), parent(NULL) {} + : attribs(ifdAttribs), order(HOSTORDER), parent(nullptr) {} TagDirectory::TagDirectory (TagDirectory* p, const TagAttrib* ta, ByteOrder border) : attribs(ta), order(border), parent(p) {} @@ -141,7 +141,7 @@ const TagAttrib* TagDirectory::getAttrib (int id) return &attribs[i]; } - return NULL; + return nullptr; } const TagAttrib* TagDirectory::getAttrib (const char* name) @@ -153,7 +153,7 @@ const TagAttrib* TagDirectory::getAttrib (const char* name) return &attribs[i]; } - return NULL; + return nullptr; } const TagAttrib* TagDirectory::getAttribP (const char* name) @@ -179,7 +179,7 @@ const TagAttrib* TagDirectory::getAttribP (const char* name) if (attribs[i].subdirAttribs && tag && (tagDir = tag->getDirectory())) { return tagDir->getAttribP(n + 1); } else { - return NULL; + return nullptr; } } else { return &attribs[i]; @@ -187,7 +187,7 @@ const TagAttrib* TagDirectory::getAttribP (const char* name) } } - return NULL; + return nullptr; } void TagDirectory::printAll (unsigned int level) const @@ -207,13 +207,11 @@ void TagDirectory::printAll (unsigned int level) const for (size_t i = 0; i < tags.size(); i++) { std::string name = tags[i]->nameToString (); - if (tags[i]->isDirectory()) + if (tags[i]->isDirectory()) { for (int j = 0; tags[i]->getDirectory(j); j++) { printf ("%s+-- DIRECTORY %s[%d]:\n", prefixStr, name.c_str(), j); tags[i]->getDirectory(j)->printAll (level + 1); } - else { - std::string value = tags[i]->valueToString (); } } } @@ -265,13 +263,13 @@ bool TagDirectory::CPBDump (const Glib::ustring &commFName, const Glib::ustring std::vector tagDirList; std::vector tagDirPaths; - FILE *f = NULL; + FILE *f = nullptr; if (!keyFile) { // open the file in write mode f = g_fopen (commFName.c_str (), "wt"); - if (f == NULL) { + if (f == nullptr) { printf("TagDirectory::keyFileDump(\"%s\") >>> Error: unable to open file with write access!\n", commFName.c_str()); delete kf; return false; @@ -398,7 +396,7 @@ Tag* TagDirectory::getTag (int ID) const return tags[i]; } - return NULL; + return nullptr; } Tag* TagDirectory::getTag (const char* name) const @@ -411,7 +409,7 @@ Tag* TagDirectory::getTag (const char* name) const } } - return NULL; + return nullptr; } Tag* TagDirectory::getTagP (const char* name) const @@ -437,7 +435,7 @@ Tag* TagDirectory::getTagP (const char* name) const if (attribs[i].subdirAttribs && tag && (tagDir = tag->getDirectory())) { return tagDir->getTagP(n + 1); } else { - return NULL; + return nullptr; } } else { return getTag (attribs[i].ID); @@ -445,7 +443,7 @@ Tag* TagDirectory::getTagP (const char* name) const } } - return NULL; + return nullptr; } Tag* TagDirectory::findTag (const char* name) const @@ -473,7 +471,7 @@ Tag* TagDirectory::findTag (const char* name) const } } - return NULL; + return nullptr; } // Searches a simple value, as either attribute or element @@ -617,7 +615,7 @@ void TagDirectory::applyChange (std::string name, std::string value) // this is a final segment: apply change if (dp == std::string::npos) { - Tag* t = NULL; + Tag* t = nullptr; for (size_t i = 0; i < tags.size(); i++) if (tags[i]->nameToString() == fseg) { @@ -632,7 +630,7 @@ void TagDirectory::applyChange (std::string name, std::string value) } else if (t && !t->isDirectory()) { t->valueFromString (value); } else { - const TagAttrib* attrib = NULL; + const TagAttrib* attrib = nullptr; for (int i = 0; attribs[i].ignore != -1; i++) if (!strcmp (attribs[i].name, fseg.c_str())) { @@ -652,7 +650,7 @@ void TagDirectory::applyChange (std::string name, std::string value) // try to find it std::string::size_type dp1 = fseg.find_first_of ('['); std::string basename = fseg.substr (0, dp1); - Tag* t = NULL; + Tag* t = nullptr; int dirnum = -1; for (size_t i = 0; i < tags.size(); i++) @@ -672,7 +670,7 @@ void TagDirectory::applyChange (std::string name, std::string value) } if (!t && value != "#keep" && value != "#delete") { - const TagAttrib* attrib = NULL; + const TagAttrib* attrib = nullptr; for (int i = 0; attribs[i].ignore != -1; i++) if (!strcmp (attribs[i].name, fseg.c_str())) { @@ -696,7 +694,7 @@ void TagDirectory::applyChange (std::string name, std::string value) } TagDirectoryTable::TagDirectoryTable () - : zeroOffset(0), valuesSize(0) + : values(nullptr), zeroOffset(0), valuesSize(0), defaultType(INVALID) { } @@ -762,7 +760,7 @@ int TagDirectoryTable::write (int start, unsigned char* buffer) //----------------------------------------------------------------------------- Tag::Tag (TagDirectory* p, FILE* f, int base) - : type(INVALID), count(0), value(NULL), allocOwnMemory(true), attrib(NULL), parent(p), directory(NULL) + : type(INVALID), count(0), value(nullptr), allocOwnMemory(true), attrib(nullptr), parent(p), directory(nullptr) { ByteOrder order = getOrder(); @@ -832,7 +830,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) fread (buffer, 1, 2, f); directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, currPos, pentaxAttribs, strncmp(buffer, "MM", 2) ? INTEL : MOTOROLA); - directory[1] = NULL; + directory[1] = nullptr; } else /* SONY uses this tag to write hidden info and pointer to private encrypted tags { @@ -878,7 +876,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) switch( tag ) { case 0x0010: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; if (count == 15360) { directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , sonyCameraInfoAttribs, order); @@ -890,7 +888,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x0114: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; if (count == 280 || count == 364) { directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, SHORT , sonyCameraSettingsAttribs, MOTOROLA); @@ -901,7 +899,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) } else { // Unknown CameraSettings delete [] directory; - directory = NULL; + directory = nullptr; type = INVALID; } @@ -910,7 +908,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x9405: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, SHORT , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; @@ -925,21 +923,21 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x0208: case 0x0216: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; case 0x0215: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, LONG , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; case 0x005c: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; if (count == 4) { // SRInfo directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , pentaxSRInfoAttribs, order); @@ -948,7 +946,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) } else { // Unknown SRInfo delete [] directory; - directory = NULL; + directory = nullptr; type = INVALID; } @@ -957,7 +955,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x0206: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; if (count == 21) { // AEInfo2 directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , pentaxAEInfo2Attribs, order); @@ -968,7 +966,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) } else { // Unknown AEInfo delete [] directory; - directory = NULL; + directory = nullptr; type = INVALID; } @@ -992,7 +990,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) } directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, offsetFirst, BYTE , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; } @@ -1000,7 +998,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x0239: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; @@ -1018,7 +1016,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x0098: case 0x00a0: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, SSHORT , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; @@ -1026,7 +1024,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) case 0x009a: case 0x4013: directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, LONG , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; @@ -1038,7 +1036,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) switch (tag) { case 0x0025: { directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , attrib->subdirAttribs, order); makerNoteKind = TABLESUBDIR; break; @@ -1052,7 +1050,7 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) type = LONG; directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, attrib->subdirAttribs, order); - directory[1] = NULL; + directory[1] = nullptr; } else { goto defsubdirs; } @@ -1092,7 +1090,7 @@ defsubdirs: } // set the terminating NULL - directory[sdcount] = NULL; + directory[sdcount] = nullptr; } else { type = INVALID; } @@ -1105,7 +1103,7 @@ defsubdirs: bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) { - value = NULL; + value = nullptr; Tag* tmake = parent->getRoot()->findTag("Make"); std::string make( tmake ? tmake->valueToString() : ""); @@ -1125,13 +1123,13 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) fread (value, 1, 8, f); directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, nikon2Attribs, bom); - directory[1] = NULL; + directory[1] = nullptr; } else if ( model.find("NIKON E990") != std::string::npos || (model.find("NIKON D1") != std::string::npos && model.size() > 8 && model.at(8) != '0')) { makerNoteKind = IFD; directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, nikon3Attribs, bom); - directory[1] = NULL; + directory[1] = nullptr; } else { // needs refinement! (embedded tiff header parsing) makerNoteKind = NIKON3; @@ -1147,13 +1145,13 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) else MakerNoteOrder = rtexif::INTEL; directory[0] = new TagDirectory (parent, f, basepos + 10, nikon3Attribs, MakerNoteOrder); - directory[1] = NULL; + directory[1] = nullptr; } } else if ( make.find( "Canon" ) != std::string::npos ) { makerNoteKind = IFD; directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, canonAttribs, bom); - directory[1] = NULL; + directory[1] = nullptr; } else if ( make.find( "PENTAX" ) != std::string::npos ) { makerNoteKind = HEADERIFD; valuesize = 6; @@ -1161,7 +1159,7 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) fread (value, 1, 6, f); directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, pentaxAttribs, bom); - directory[1] = NULL; + directory[1] = nullptr; } else if ( (make.find( "RICOH" ) != std::string::npos ) && (model.find("PENTAX") != std::string::npos) ) { makerNoteKind = HEADERIFD; valuesize = 10; @@ -1169,7 +1167,7 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) fread (value, 1, 10, f); directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, ftell (f) - 10, pentaxAttribs, bom); - directory[1] = NULL; + directory[1] = nullptr; } else if ( make.find( "FUJIFILM" ) != std::string::npos ) { makerNoteKind = FUJI; valuesize = 12; @@ -1177,12 +1175,12 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) fread (value, 1, 12, f); directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, ftell(f) - 12, fujiAttribs, INTEL); - directory[1] = NULL; + directory[1] = nullptr; } else if ( make.find( "KONICA MINOLTA" ) != std::string::npos || make.find( "Minolta" ) != std::string::npos ) { makerNoteKind = IFD; directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, minoltaAttribs, bom); - directory[1] = NULL; + directory[1] = nullptr; } else if ( make.find( "SONY" ) != std::string::npos ) { valuesize = 12; value = new unsigned char[12]; @@ -1197,14 +1195,14 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, sonyAttribs, bom ); - directory[1] = NULL; + directory[1] = nullptr; } else if ( make.find( "OLYMPUS" ) != std::string::npos ) { makerNoteKind = HEADERIFD; valuesize = 8; value = new unsigned char[12]; fread (value, 1, 8, f); directory = new TagDirectory*[2]; - directory[1] = NULL; + directory[1] = nullptr; if (!strncmp((char*)value, "OLYMPUS", 7)) { makerNoteKind = OLYMPUS2; @@ -1236,7 +1234,7 @@ Tag* Tag::clone (TagDirectory* parent) t->value = new unsigned char [valuesize]; memcpy (t->value, value, valuesize); } else { - value = NULL; + value = nullptr; } t->makerNoteKind = makerNoteKind; @@ -1252,9 +1250,9 @@ Tag* Tag::clone (TagDirectory* parent) t->directory[i] = directory[i]->clone (parent); } - t->directory[ds] = NULL; + t->directory[ds] = nullptr; } else { - t->directory = NULL; + t->directory = nullptr; } return t; @@ -1269,9 +1267,8 @@ Tag::~Tag () } // if there are directories behind the tag, delete them - int i = 0; - if (directory) { + int i = 0; while (directory[i]) { delete directory[i++]; } @@ -1600,11 +1597,10 @@ std::string Tag::nameToString (int i) std::string Tag::valueToString () { - char buffer[1024]; - if (attrib && attrib->interpreter) { return attrib->interpreter->toString (this); } else { + char buffer[1024]; toString (buffer); return buffer; } @@ -1723,26 +1719,26 @@ int Tag::write (int offs, int dataOffs, unsigned char* buffer) } Tag::Tag (TagDirectory* p, const TagAttrib* attr) - : tag(attr ? attr->ID : -1), type(INVALID), count(0), value(NULL), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(NULL), makerNoteKind (NOMK) + : tag(attr ? attr->ID : -1), type(INVALID), count(0), value(nullptr), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(nullptr), makerNoteKind (NOMK) { } Tag::Tag (TagDirectory* p, const TagAttrib* attr, int data, TagType t) - : tag(attr ? attr->ID : -1), type(t), count(1), value(NULL), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(NULL), makerNoteKind (NOMK) + : tag(attr ? attr->ID : -1), type(t), count(1), value(nullptr), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(nullptr), makerNoteKind (NOMK) { initInt (data, t); } Tag::Tag (TagDirectory* p, const TagAttrib* attr, unsigned char *data, TagType t) - : tag(attr ? attr->ID : -1), type(t), count(1), value(NULL), valuesize(0), keep(true), allocOwnMemory(false), attrib(attr), parent(p), directory(NULL), makerNoteKind (NOMK) + : tag(attr ? attr->ID : -1), type(t), count(1), value(nullptr), valuesize(0), keep(true), allocOwnMemory(false), attrib(attr), parent(p), directory(nullptr), makerNoteKind (NOMK) { initType (data, t); } Tag::Tag (TagDirectory* p, const TagAttrib* attr, const char* text) - : tag(attr ? attr->ID : -1), type(ASCII), count(1), value(NULL), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(NULL), makerNoteKind (NOMK) + : tag(attr ? attr->ID : -1), type(ASCII), count(1), value(nullptr), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(nullptr), makerNoteKind (NOMK) { initString (text); @@ -1799,8 +1795,8 @@ void Tag::initSubDir () value = new unsigned char[4]; setInt (0); directory = new TagDirectory*[2]; - directory[0] = new TagDirectory (parent, attrib ? attrib->subdirAttribs : NULL, parent->getOrder()); - directory[1] = NULL; + directory[0] = new TagDirectory (parent, attrib ? attrib->subdirAttribs : nullptr, parent->getOrder()); + directory[1] = nullptr; } void Tag::initSubDir (TagDirectory* dir) @@ -1812,7 +1808,7 @@ void Tag::initSubDir (TagDirectory* dir) setInt (0); directory = new TagDirectory*[2]; directory[0] = dir; - directory[1] = NULL; + directory[1] = nullptr; } void Tag::initMakerNote (MNKind mnk, const TagAttrib* ta) @@ -1824,7 +1820,7 @@ void Tag::initMakerNote (MNKind mnk, const TagAttrib* ta) setInt (0); directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, ta, parent->getOrder()); - directory[1] = NULL; + directory[1] = nullptr; makerNoteKind = mnk; } @@ -1868,14 +1864,14 @@ const TagAttrib* lookupAttrib (const TagAttrib* dir, const char* field) return &dir[i]; } - return 0; + return nullptr; } TagDirectory* ExifManager::parseCIFF (FILE* f, int base, int length) { - TagDirectory* root = new TagDirectory (NULL, ifdAttribs, INTEL); + TagDirectory* root = new TagDirectory (nullptr, ifdAttribs, INTEL); Tag* exif = new Tag (root, lookupAttrib(ifdAttribs, "Exif")); exif->initSubDir (); Tag* mn = new Tag (exif->getDirectory(), lookupAttrib(exifAttribs, "MakerNote")); @@ -1924,7 +1920,7 @@ void ExifManager::parseCIFF (FILE* f, int base, int length, TagDirectory* root) TagDirectory* exif = root->getTag("Exif")->getDirectory(); - time_t timestamp = time (NULL); + time_t timestamp = time (nullptr); for (int i = 0; i < numOfTags; i++) { @@ -2153,7 +2149,7 @@ void ExifManager::parseCIFF (FILE* f, int base, int length, TagDirectory* root) exif->addTag (t); } - if (timestamp != time(NULL)) { + if (timestamp != time(nullptr)) { struct tm* tim = localtime (×tamp); strftime (buffer, 20, "%Y:%m:%d %H:%M:%S", tim); t = new Tag (exif, lookupAttrib(exifAttribs, "DateTimeOriginal")); @@ -2305,21 +2301,21 @@ parse_leafdata(TagDirectory* root, ByteOrder order) // Quick-and-dirty value extractor, no real xml parsing. // We could make it more generic, but we just get most important // values we know use to be in there. - if ((p = strstr(xmp, "xmlns:tiff")) != NULL && - (end = strstr(p, "")) != NULL) { + if ((p = strstr(xmp, "xmlns:tiff")) != nullptr && + (end = strstr(p, "")) != nullptr) { *end = '\0'; - while ((p = strstr(p, "')) == NULL) { + if ((tagend = strchr(tag, '>')) == nullptr) { break; } *tagend = '\0'; char *val = &tagend[1]; - if ((p = strstr(val, "initString (val); } - if (p1 != NULL) { + if (p1 != nullptr) { *p1 = '('; } } else { @@ -2369,21 +2365,21 @@ parse_leafdata(TagDirectory* root, ByteOrder order) *end = '<'; } - if ((p = strstr(xmp, "xmlns:exif")) != NULL && - (end = strstr(p, "")) != NULL) { + if ((p = strstr(xmp, "xmlns:exif")) != nullptr && + (end = strstr(p, "")) != nullptr) { *end = '\0'; - while ((p = strstr(p, "')) == NULL) { + if ((tagend = strchr(tag, '>')) == nullptr) { break; } *tagend = '\0'; char *val = &tagend[1]; - if ((p = strstr(val, "getTag ("Make"); @@ -2552,7 +2548,7 @@ TagDirectory* ExifManager::parse (FILE* f, int base, bool skipIgnored) if (!exif) { // old Kodak cameras may have exif tags in IFD0, reparse and create an exif subdir fseek (f, base + firstifd, SEEK_SET); - TagDirectory* exifdir = new TagDirectory (NULL, f, base, exifAttribs, order, true); + TagDirectory* exifdir = new TagDirectory (nullptr, f, base, exifAttribs, order, true); exif = new Tag (root, root->getAttrib ("Exif")); exif->initSubDir(exifdir); @@ -2595,7 +2591,7 @@ TagDirectory* ExifManager::parse (FILE* f, int base, bool skipIgnored) tethered. In single-shot mode they should be exactly the same as the single-shot models. */ Tag *subd = root->getTag(0x14a); - Tag *iw = (subd) ? subd->getDirectory()->getTag("ImageWidth") : 0; + Tag *iw = (subd) ? subd->getDirectory()->getTag("ImageWidth") : nullptr; int sensorWidth = (iw) ? iw->toInt() : 0; Tag* tmodel = root->getTag ("Model"); const char *model = (tmodel) ? (const char *)tmodel->getValue() : ""; @@ -2771,7 +2767,7 @@ TagDirectory* ExifManager::parseJPEG (FILE* f) if (fread (&c, 1, 1, f) && c == 0xe1) { // APP1 marker found if (fread (idbuff, 1, 8, f) < 8) { - return NULL; + return nullptr; } if (!memcmp(idbuff + 2, exifid, 6)) { // Exif info found @@ -2781,7 +2777,7 @@ TagDirectory* ExifManager::parseJPEG (FILE* f) } } - return NULL; + return nullptr; } TagDirectory* ExifManager::parseTIFF (FILE* f, bool skipIgnored) @@ -2831,14 +2827,13 @@ int ExifManager::createJPEGMarker (const TagDirectory* root, const rtengine::pro sset2 (42, buffer + offs, order); offs += 2; sset4 (8, buffer + offs, order); - offs += 4; TagDirectory* cl; if (root) { - cl = (const_cast(root))->clone (NULL); + cl = (const_cast(root))->clone (nullptr); } else { - cl = new TagDirectory (NULL, ifdAttribs, INTEL); + cl = new TagDirectory (nullptr, ifdAttribs, INTEL); } for (rtengine::procparams::ExifPairs::const_iterator i = changeList.begin(); i != changeList.end(); ++i) { @@ -2879,7 +2874,7 @@ int ExifManager::createTIFFHeader (const TagDirectory* root, const rtengine::pro TagDirectory* cl; if (root) { - cl = (const_cast(root))->clone (NULL); + cl = (const_cast(root))->clone (nullptr); // remove some unknown top level tags which produce warnings when opening a tiff Tag *removeTag = cl->getTag(0x9003); if(removeTag) @@ -2888,7 +2883,7 @@ int ExifManager::createTIFFHeader (const TagDirectory* root, const rtengine::pro if(removeTag) removeTag->setKeep(false); } else { - cl = new TagDirectory (NULL, ifdAttribs, HOSTORDER); + cl = new TagDirectory (nullptr, ifdAttribs, HOSTORDER); } // add tiff strip data @@ -2964,7 +2959,6 @@ int ExifManager::createTIFFHeader (const TagDirectory* root, const rtengine::pro sset2 (42, buffer + offs, order); offs += 2; sset4 (8, buffer + offs, order); - offs += 4; int endOffs = cl->write (8, buffer); diff --git a/rtexif/rtexif.h b/rtexif/rtexif.h index 7777331e9..e1d8ede6e 100644 --- a/rtexif/rtexif.h +++ b/rtexif/rtexif.h @@ -28,7 +28,9 @@ #include #include #include + #include "../rtengine/procparams.h" +#include "../rtengine/noncopyable.h" class CacheImageData; @@ -155,7 +157,7 @@ public: virtual void printAll (unsigned int level = 0) const; // reentrant debug function, keep level=0 on first call ! virtual bool CPBDump (const Glib::ustring &commFName, const Glib::ustring &imageFName, const Glib::ustring &profileFName, const Glib::ustring &defaultPParams, - const CacheImageData* cfs, const bool flagMode, Glib::KeyFile *keyFile = NULL, Glib::ustring tagDirName = "") const; + const CacheImageData* cfs, const bool flagMode, Glib::KeyFile *keyFile = nullptr, Glib::ustring tagDirName = "") const; virtual void sort (); }; @@ -178,7 +180,8 @@ public: }; // a class representing a single tag -class Tag +class Tag : + public rtengine::NonCopyable { protected: @@ -202,6 +205,7 @@ public: Tag (TagDirectory* parent, const TagAttrib* attr, unsigned char *data, TagType t); Tag (TagDirectory* parent, const TagAttrib* attr, int data, TagType t); // create a new tag from array (used Tag (TagDirectory* parent, const TagAttrib* attr, const char* data); // create a new tag from array (used + ~Tag (); void initType (unsigned char *data, TagType type); void initInt (int data, TagType t, int count = 1); @@ -289,11 +293,11 @@ public: // get subdirectory (there can be several, the last is NULL) bool isDirectory () { - return directory != NULL; + return directory != nullptr; } TagDirectory* getDirectory (int i = 0) { - return (directory) ? directory[i] : 0; + return (directory) ? directory[i] : nullptr; } MNKind getMakerNoteFormat () @@ -533,7 +537,7 @@ protected: double deltaMin = 1000.; for ( r = choices.lower_bound( lensID ); r != choices.upper_bound(lensID); ++r ) { - double lensAperture, dif; + double dif; if( !extractLensInfo( r->second , f1, f2, a1, a2) ) { continue; @@ -548,6 +552,7 @@ protected: } if( maxApertureAtFocal > 0.1) { + double lensAperture; if( maxApertureAtFocal < a1 - 0.15 || maxApertureAtFocal > a2 + 0.15) { continue; } diff --git a/rtexif/sonyminoltaattribs.cc b/rtexif/sonyminoltaattribs.cc index 7f4e1bb53..a559969bf 100644 --- a/rtexif/sonyminoltaattribs.cc +++ b/rtexif/sonyminoltaattribs.cc @@ -541,513 +541,515 @@ public: }; SAAntiBlurInterpreter saAntiBlurInterpreter; -class SALensIDInterpreter : public IntLensInterpreter< int > +class SALensIDInterpreter : public IntLensInterpreter { public: SALensIDInterpreter () { - 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 [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 [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 (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")); - choices.insert(p_t(17, "Minolta AF 20-35mm f/3.5-4.5")); - choices.insert(p_t(18, "Minolta AF 28-80mm f/3.5-5.6 II")); - choices.insert(p_t(19, "Minolta AF 35mm f/1.4 G")); - 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) 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 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) or Tamron Lens")); - choices.insert(p_t(28, "Tamron SP AF 90mm f/2.8 Di 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) 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 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) 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")); - choices.insert(p_t(35, "Minolta AF 85mm f/1.4 G (D) Limited")); - choices.insert(p_t(36, "Minolta AF 28-100mm f/3.5-5.6 (D)")); - 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) 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/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 or Commlite CM-EF-NEX adapter")); - 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 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 10mm f/2.8 EX DC HSM Fisheye")); - 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(128, "Sigma 50-500mm f/4.5-6.3 APO DG OS 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")); - choices.insert(p_t(135, "Vivitar 28-210mm f/3.5-5.6")); - 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 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(1868, "Sigma MC-11 Adapter")); - choices.insert(p_t(2550, "Minolta AF 50mm f/1.7")); - 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(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, "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(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 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/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 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")); - choices.insert(p_t(2561, "Sigma AF 170-500mm f/5-6.3 APO Aspherical")); - 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(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 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 APO")); - 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/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/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 180mm f/5.6 Macro")); - 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 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-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 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 [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")); - choices.insert(p_t(2607, "Minolta AF 35-80mm f/4-5.6")); - 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 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 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 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 HS-APO G")); - choices.insert(p_t(2629, "Minolta AF 85mm f/1.4 New")); - choices.insert(p_t(2631, "Minolta/Sony AF 100-300mm f/4.5-5.6 APO")); - 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/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(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(4812, "Metabones Canon EF Speed Booster Ultra")); - choices.insert(p_t(6118, "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 24-70mm f/2.8 GM")); - choices.insert(p_t(6553, "Sony FE 85mm f/1.4 GM")); - choices.insert(p_t(6553, "Sony FE 50mm f/1.8")); - 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, "Sony FE 70-300mm f/4.5-5.6 G OSS")); - choices.insert(p_t(6553, "Sony FE 70-200mm f/2.8 GM OSS")); - 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, "Sigma 30mm f/1.4 DC DN | C")); - 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 Batis 18mm f/2.8")); - choices.insert(p_t(6553, "Zeiss Loxia 21mm f/2.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.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.0")); - choices.insert(p_t(18688, "Sigma MC-11 Adapter")); - choices.insert(p_t(25501, "Minolta AF 50mm f/1.7")); - 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(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, "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(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 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")); - choices.insert(p_t(25561, "Minolta AF 135mm f/2.8")); - 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 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")); - choices.insert(p_t(25611, "Sigma AF 170-500mm f/5-6.3 APO Aspherical")); - choices.insert(p_t(25611, "Tokina AT-X AF 300mm f/4")); - choices.insert(p_t(25611, "Tokina AT-X AF 400mm f/5.6 SD")); - 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 [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 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 APO")); - 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 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 or Tokina Lens")); - choices.insert(p_t(25791, "Tokina AT-X Pro DX 11-16mm f/2.8")); - 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 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 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 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 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 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 [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 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")); - choices.insert(p_t(26061, "Minolta AF 100-300mm f/4.5-5.6")); - choices.insert(p_t(26071, "Minolta AF 35-80mm f/4-5.6")); - choices.insert(p_t(26081, "Minolta AF 300mm f/2.8 HS-APO G")); - choices.insert(p_t(26091, "Minolta AF 600mm f/4 HS-APO G")); - choices.insert(p_t(26121, "Minolta AF 200mm f/2.8 HS-APO G")); - choices.insert(p_t(26131, "Minolta AF 50mm f/1.7 New")); - choices.insert(p_t(26151, "Minolta AF 28-105mm f/3.5-4.5 xi")); - choices.insert(p_t(26161, "Minolta AF 35-200mm f/4.5-5.6 xi")); - choices.insert(p_t(26181, "Minolta AF 28-80mm f/4-5.6 xi")); - choices.insert(p_t(26191, "Minolta AF 80-200mm f/4.5-5.6 xi")); - choices.insert(p_t(26201, "Minolta AF 28-70mm f/2.8 G")); - choices.insert(p_t(26211, "Minolta AF 100-300mm f/4.5-5.6 xi")); - choices.insert(p_t(26241, "Minolta AF 35-80mm f/4-5.6 Power Zoom")); - choices.insert(p_t(26281, "Minolta AF 80-200mm f/2.8 HS-APO G")); - choices.insert(p_t(26291, "Minolta AF 85mm f/1.4 New")); - choices.insert(p_t(26311, "Minolta/Sony AF 100-300mm f/4.5-5.6 APO")); - choices.insert(p_t(26321, "Minolta AF 24-50mm f/4 New")); - choices.insert(p_t(26381, "Minolta AF 50mm f/2.8 Macro New")); - choices.insert(p_t(26391, "Minolta AF 100mm f/2.8 Macro")); - choices.insert(p_t(26411, "Minolta/Sony AF 20mm f/2.8 New")); - choices.insert(p_t(26421, "Minolta AF 24mm f/2.8 New")); - choices.insert(p_t(26441, "Minolta AF 100-400mm f/4.5-6.7 APO")); - choices.insert(p_t(26621, "Minolta AF 50mm f/1.4 New")); - 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(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(48128, "Metabones Canon EF Speed Booster Ultra")); - choices.insert(p_t(61184, "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")); - choices.insert(p_t(65535, "Sony E 18-200mm f/3.5-6.3 OSS")); - choices.insert(p_t(65535, "Sony E 30mm f/3.5 Macro")); - choices.insert(p_t(65535, "Sony E 24mm f/1.8 ZA")); - choices.insert(p_t(65535, "Sony E 50mm f/1.8 OSS")); - choices.insert(p_t(65535, "Sony E 16-70mm f/4 ZA OSS")); - choices.insert(p_t(65535, "Sony E 10-18mm f/4 OSS")); - choices.insert(p_t(65535, "Sony E PZ 16-50mm f/3.5-5.6 OSS")); - choices.insert(p_t(65535, "Sony FE 35mm f/2.8 ZA")); - choices.insert(p_t(65535, "Sony FE 24-70mm f/4 ZA OSS")); - 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 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 24-70mm f/2.8 GM")); - choices.insert(p_t(65535, "Sony FE 85mm f/1.4 GM")); - choices.insert(p_t(65535, "Sony FE 50mm f/1.8")); - 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, "Sony FE 70-300mm f/4.5-5.6 G OSS")); - choices.insert(p_t(65535, "Sony FE 70-200mm f/2.8 GM OSS")); - 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, "Sigma 30mm f/1.4 DC DN | C")); - 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 Batis 18mm f/2.8")); - choices.insert(p_t(65535, "Zeiss Loxia 21mm f/2.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 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.0")); + choices = { + {0, "Minolta AF 28-85mm f/3.5-4.5 New"}, + {1, "Minolta AF 80-200mm f/2.8 HS-APO G"}, + {2, "Minolta AF 28-70mm f/2.8 G"}, + {3, "Minolta AF 28-80mm f/4-5.6"}, + {4, "Minolta AF 85mm f/1.4G"}, + {5, "Minolta AF 35-70mm f/3.5-4.5 [II]"}, + {6, "Minolta AF 24-85mm f/3.5-4.5 [New]"}, + {7, "Minolta AF 100-300mm f/4.5-5.6 APO [New] or 100-400mm or Sigma Lens"}, + {7, "Minolta AF 100-400mm f/4.5-6.7 APO"}, + {7, "Sigma AF 100-300mm f/4 EX DG IF"}, + {8, "Minolta AF 70-210mm f/4.5-5.6 [II]"}, + {9, "Minolta AF 50mm f/3.5 Macro"}, + {10, "Minolta AF 28-105mm f/3.5-4.5 [New]"}, + {11, "Minolta AF 300mm f/4 HS-APO G"}, + {12, "Minolta AF 100mm f/2.8 Soft Focus"}, + {13, "Minolta AF 75-300mm f/4.5-5.6 (New or II)"}, + {14, "Minolta AF 100-400mm f/4.5-6.7 APO"}, + {15, "Minolta AF 400mm f/4.5 HS-APO G"}, + {16, "Minolta AF 17-35mm f/3.5 G"}, + {17, "Minolta AF 20-35mm f/3.5-4.5"}, + {18, "Minolta AF 28-80mm f/3.5-5.6 II"}, + {19, "Minolta AF 35mm f/1.4 G"}, + {20, "Minolta/Sony 135mm f/2.8 [T4.5] STF"}, + {22, "Minolta AF 35-80mm f/4-5.6 II"}, + {23, "Minolta AF 200mm f/4 Macro APO G"}, + {24, "Minolta/Sony AF 24-105mm f/3.5-4.5 (D) or Sigma or Tamron Lens"}, + {24, "Sigma 18-50mm f/2.8"}, + {24, "Sigma 17-70mm f/2.8-4.5 (D)"}, + {24, "Sigma 20-40mm f/2.8 EX DG Aspherical IF"}, + {24, "Sigma 18-200mm f/3.5-6.3 DC"}, + {24, "Sigma DC 18-125mm f/4-5,6 D"}, + {24, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical [IF] Macro"}, + {25, "Minolta AF 100-300mm f/4.5-5.6 APO (D) or Sigma Lens"}, + {25, "Sigma 100-300mm f/4 EX (APO (D) or D IF)"}, + {25, "Sigma 70mm f/2.8 EX DG Macro"}, + {25, "Sigma 20mm f/1.8 EX DG Aspherical RF"}, + {25, "Sigma 30mm f/1.4 EX DC"}, + {25, "Sigma 24mm f/1.8 EX DG ASP Macro"}, + {27, "Minolta AF 85mm f/1.4 G (D)"}, + {28, "Minolta/Sony AF 100mm f/2.8 Macro (D) or Tamron Lens"}, + {28, "Tamron SP AF 90mm f/2.8 Di Macro"}, + {28, "Tamron SP AF 180mm f/3.5 Di LD [IF] Macro"}, + {29, "Minolta/Sony AF 75-300mm f/4.5-5.6 (D)"}, + {30, "Minolta AF 28-80mm f/3.5-5.6 (D) or Sigma Lens"}, + {30, "Sigma AF 10-20mm f/4-5.6 EX DC"}, + {30, "Sigma AF 12-24mm f/4.5-5.6 EX DG"}, + {30, "Sigma 28-70mm EX DG f/2.8"}, + {30, "Sigma 55-200mm f/4-5.6 DC"}, + {31, "Minolta/Sony AF 50mm f/2.8 Macro (D) or f/3.5"}, + {31, "Minolta/Sony AF 50mm f/3.5 Macro"}, + {32, "Minolta/Sony AF 300mm f/2.8 G or 1.5x Teleconverter"}, + {33, "Minolta/Sony AF 70-200mm f/2.8 G"}, + {35, "Minolta AF 85mm f/1.4 G (D) Limited"}, + {36, "Minolta AF 28-100mm f/3.5-5.6 (D)"}, + {38, "Minolta AF 17-35mm f/2.8-4 (D)"}, + {39, "Minolta AF 28-75mm f/2.8 (D)"}, + {40, "Minolta/Sony AF DT 18-70mm f/3.5-5.6 (D)"}, + {41, "Minolta/Sony AF DT 11-18mm f/4.5-5.6 (D) or Tamron Lens"}, + {41, "Tamron SP AF 11-18mm f/4.5-5.6 Di II LD Aspherical IF"}, + {42, "Minolta/Sony AF DT 18-200mm f/3.5-6.3 (D)"}, + {43, "Sony 35mm f/1.4 G (SAL35F14G)"}, + {44, "Sony 50mm f/1.4 (SAL50F14)"}, + {45, "Carl Zeiss Planar T* 85mm f/1.4 ZA (SAL85F14Z)"}, + {46, "Carl Zeiss Vario-Sonnar T* DT 16-80mm f/3.5-4.5 ZA (SAL1680Z)"}, + {47, "Carl Zeiss Sonnar T* 135mm f/1.8 ZA (SAL135F18Z)"}, + {48, "Carl Zeiss Vario-Sonnar T* 24-70mm f/2.8 ZA SSM (SAL2470Z) or ZA SSM II"}, + {48, "Carl Zeiss Vario-Sonnar T* 24-70mm f/2.8 ZA SSM II (SAL2470Z2)"}, + {49, "Sony DT 55-200mm f/4-5.6 (SAL55200)"}, + {50, "Sony DT 18-250mm f/3.5-6.3 (SAL18250)"}, + {51, "Sony DT 16-105mm f/3.5-5.6 (SAL16105)"}, + {52, "Sony 70-300mm f/4.5-5.6 G SSM (SAL70300G) or G SSM II or Tamron Lens"}, + {52, "Sony 70-300mm f/4.5-5.6 G SSM II (SAL70300G2)"}, + {52, "Tamron SP 70-300mm f/4-5.6 Di USD"}, + {53, "Sony 70-400mm f/4-5.6 G SSM (SAL70400G)"}, + {54, "Carl Zeiss Vario-Sonnar T* 16-35mm f/2.8 ZA SSM (SAL1635Z) or ZA SSM II"}, + {54, "Carl Zeiss Vario-Sonnar T* 16-35mm f/2.8 ZA SSM II (SAL1635Z2)"}, + {55, "Sony DT 18-55mm f/3.5-5.6 SAM (SAL1855) or SAM II"}, + {55, "Sony DT 18-55mm f/3.5-5.6 SAM II (SAL18552)"}, + {56, "Sony DT 55-200mm f/4-5.6 SAM (SAL55200-2)"}, + {57, "Sony DT 50mm f/1.8 SAM (SAL50F18) or Tamron Lens or Commlite CM-EF-NEX adapter"}, + {57, "Tamron SP AF 60mm f/2 Di II LD [IF] Macro 1:1"}, + {57, "Tamron 18-270mm f/3.5-6.3 Di II PZD"}, + {58, "Sony DT 30mm f/2.8 Macro SAM (SAL30M28)"}, + {59, "Sony 28-75mm f/2.8 SAM (SAL2875)"}, + {60, "Carl Zeiss Distagon T* 24mm f/2 ZA SSM (SAL24F20Z)"}, + {61, "Sony 85mm f/2.8 SAM (SAL85F28)"}, + {62, "Sony DT 35mm f/1.8 SAM (SAL35F18)"}, + {63, "Sony DT 16-50mm f/2.8 SSM (SAL1650)"}, + {64, "Sony 500mm f/4 G SSM (SAL500F40G)"}, + {65, "Sony DT 18-135mm f/3.5-5.6 SAM (SAL18135)"}, + {66, "Sony 300mm f/2.8 G SSM II (SAL300F28G2)"}, + {67, "Sony 70-200mm f/2.8 G SSM II (SAL70200G2)"}, + {68, "Sony DT 55-300mm f/4.5-5.6 SAM (SAL55300)"}, + {69, "Sony 70-400mm f/4-5.6 G SSM II (SAL70400G2)"}, + {70, "Carl Zeiss Planar T* 50mm f/1.4 ZA SSM (SAL50F14Z)"}, + {128, "Tamron or Sigma Lens (128)"}, + {128, "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical [IF] Macro"}, + {128, "Tamron AF 28-300mm f/3.5-6.3 XR Di LD Aspherical [IF] Macro"}, + {128, "Tamron 80-300mm f/3.5-6.3"}, + {128, "Tamron AF 28-200mm f/3.8-5.6 XR Di Aspherical [IF] Macro"}, + {128, "Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical IF"}, + {128, "Sigma AF 50-150mm f/2.8 EX DC APO HSM II"}, + {128, "Sigma 10-20mm f/3.5 EX DC HSM"}, + {128, "Sigma 70-200mm f/2.8 II EX DG APO MACRO HSM"}, + {128, "Sigma 10mm f/2.8 EX DC HSM Fisheye"}, + {128, "Sigma 50mm f/1.4 EX DG HSM"}, + {128, "Sigma 85mm f/1.4 EX DG HSM"}, + {128, "Sigma 24-70mm f/2.8 IF EX DG HSM"}, + {128, "Sigma 18-250mm f/3.5-6.3 DC OS HSM"}, + {128, "Sigma 17-50mm f/2.8 EX DC HSM"}, + {128, "Sigma 17-70mm f/2.8-4 DC Macro HSM"}, + {128, "Sigma 150mm f/2.8 EX DG OS HSM APO Macro"}, + {128, "Sigma 150-500mm f/5-6.3 APO DG OS HSM"}, + {128, "Tamron AF 28-105mm f/4-5.6 [IF]"}, + {128, "Sigma 35mm f/1.4 DG HSM"}, + {128, "Sigma 18-35mm f/1.8 DC HSM"}, + {128, "Sigma 50-500mm f/4.5-6.3 APO DG OS HSM"}, + {129, "Tamron Lens (129)"}, + {129, "Tamron 200-400mm f/5.6 LD"}, + {129, "Tamron 70-300mm f/4-5.6 LD"}, + {131, "Tamron 20-40mm f/2.7-3.5 SP Aspherical IF"}, + {135, "Vivitar 28-210mm f/3.5-5.6"}, + {136, "Tokina EMZ M100 AF 100mm f/3.5"}, + {137, "Cosina 70-210mm f/2.8-4 AF"}, + {138, "Soligor 19-35mm f/3.5-4.5"}, + {139, "Tokina AF 28-300mm f/4-6.3"}, + {142, "Voigtlander 70-300mm f/4.5-5.6"}, + {146, "Voigtlander Macro APO-Lanthar 125mm f/2.5 SL"}, + {194, "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical [IF]"}, + {203, "Tamron SP 70-200mm f/2.8 Di USD"}, + {204, "Tamron SP 24-70mm f/2.8 Di USD"}, + {213, "Tamron 16-300mm f/3.5-6.3 Di II PZD"}, + {214, "Tamron SP 150-600mm f/5-6.3 Di USD"}, + {224, "Tamron SP 90mm f/2.8 Di Macro 1:1 USD"}, + {255, "Tamron Lens (255)"}, + {255, "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical"}, + {255, "Tamron AF 18-250mm f/3.5-6.3 XR Di II LD"}, + {255, "Tamron AF 55-200mm f/4-5.6 Di II LD Macro"}, + {255, "Tamron AF 70-300mm f/4-5.6 Di LD Macro 1:2"}, + {255, "Tamron SP AF 200-500mm f/5.0-6.3 Di LD IF"}, + {255, "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical IF"}, + {255, "Tamron SP AF 70-200mm f/2.8 Di LD IF Macro"}, + {255, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical IF"}, + {255, "Tamron AF 90-300mm f/4.5-5.6 Telemacro"}, + {1868, "Sigma MC-11 Adapter"}, + {2550, "Minolta AF 50mm f/1.7"}, + {2551, "Minolta AF 35-70mm f/4 or Other Lens"}, + {2551, "Sigma UC AF 28-70mm f/3.5-4.5"}, + {2551, "Sigma AF 28-70mm f/2.8"}, + {2551, "Sigma M-AF 70-200mm f/2.8 EX Aspherical"}, + {2551, "Quantaray M-AF 35-80mm f/4-5.6"}, + {2551, "Tokina 28-70mm f/2.8-4.5 AF"}, + {2552, "Minolta AF 28-85mm f/3.5-4.5 or Other Lens"}, + {2552, "Tokina 19-35mm f/3.5-4.5"}, + {2552, "Tokina 28-70mm f/2.8 AT-X"}, + {2552, "Tokina 80-400mm f/4.5-5.6 AT-X AF II 840"}, + {2552, "Tokina AF PRO 28-80mm f/2.8 AT-X 280"}, + {2552, "Tokina AT-X PRO [II] AF 28-70mm f/2.6-2.8 270"}, + {2552, "Tamron AF 19-35mm f/3.5-4.5"}, + {2552, "Angenieux AF 28-70mm f/2.6"}, + {2552, "Tokina AT-X 17 AF 17mm f/3.5"}, + {2552, "Tokina 20-35mm f/3.5-4.5 II AF"}, + {2553, "Minolta AF 28-135mm f/4-4.5 or Sigma Lens"}, + {2553, "Sigma ZOOM-alpha 35-135mm f/3.5-4.5"}, + {2553, "Sigma 28-105mm f/2.8-4 Aspherical"}, + {2553, "Sigma 28-105mm f/4-5.6 UC"}, + {2554, "Minolta AF 35-105mm f/3.5-4.5"}, + {2555, "Minolta AF 70-210mm f/4 Macro or Sigma Lens"}, + {2555, "Sigma 70-210mm f/4-5.6 APO"}, + {2555, "Sigma M-AF 70-200mm f/2.8 EX APO"}, + {2555, "Sigma 75-200mm f/2.8-3.5"}, + {2556, "Minolta AF 135mm f/2.8"}, + {2557, "Minolta/Sony AF 28mm f/2.8"}, + {2558, "Minolta AF 24-50mm f/4"}, + {2560, "Minolta AF 100-200mm f/4.5"}, + {2561, "Minolta AF 75-300mm f/4.5-5.6 or Sigma Lens"}, + {2561, "Sigma 70-300mm f/4-5.6 DL Macro"}, + {2561, "Sigma 300mm f/4 APO Macro"}, + {2561, "Sigma AF 500mm f/4.5 APO"}, + {2561, "Sigma AF 170-500mm f/5-6.3 APO Aspherical"}, + {2561, "Tokina AT-X AF 300mm f/4"}, + {2561, "Tokina AT-X AF 400mm f/5.6 SD"}, + {2561, "Tokina AF 730 II 75-300mm f/4.5-5.6"}, + {2561, "Sigma 800mm f/5.6 APO"}, + {2561, "Sigma AF 400mm f/5.6 APO Macro"}, + {2562, "Minolta AF 50mm f/1.4 [New]"}, + {2563, "Minolta AF 300mm f/2.8 APO or Sigma Lens"}, + {2563, "Sigma AF 50-500mm f/4-6.3 EX DG APO"}, + {2563, "Sigma AF 170-500mm f/5-6.3 APO Aspherical"}, + {2563, "Sigma AF 500mm f/4.5 EX DG APO"}, + {2563, "Sigma 400mm f/5.6 APO"}, + {2564, "Minolta AF 50mm f/2.8 Macro or Sigma Lens"}, + {2564, "Sigma 50mm f/2.8 EX Macro"}, + {2565, "Minolta AF 600mm f/4 APO"}, + {2566, "Minolta AF 24mm f/2.8 or Sigma Lens"}, + {2566, "Sigma 17-35mm f/2.8-4 EX Aspherical"}, + {2572, "Minolta/Sony AF 500mm f/8 Reflex"}, + {2578, "Minolta/Sony AF 16mm f/2.8 Fisheye or Sigma Lens"}, + {2578, "Sigma 8mm f/4 EX [DG] Fisheye"}, + {2578, "Sigma 14mm f/3.5"}, + {2578, "Sigma 15mm f/2.8 Fisheye"}, + {2579, "Minolta/Sony AF 20mm f/2.8 or Tokina Lens"}, + {2579, "Tokina AT-X Pro DX 11-16mm f/2.8"}, + {2581, "Minolta AF 100mm f/2.8 Macro [New] or Sigma or Tamron Lens"}, + {2581, "Sigma AF 90mm f/2.8 Macro"}, + {2581, "Sigma AF 105mm f/2.8 EX [DG] Macro"}, + {2581, "Sigma 180mm f/5.6 Macro"}, + {2581, "Sigma 180mm f/3.5 EX DG Macro"}, + {2581, "Tamron 90mm f/2.8 Macro"}, + {2585, "Minolta AF 35-105mm f/3.5-4.5 New or Tamron Lens"}, + {2585, "Beroflex 35-135mm f/3.5-4.5"}, + {2585, "Tamron 24-135mm f/3.5-5.6"}, + {2588, "Minolta AF 70-210mm f/3.5-4.5"}, + {2589, "Minolta AF 80-200mm f/2.8 APO or Tokina Lens"}, + {2589, "Tokina 80-200mm f/2.8"}, + {2590, "Minolta AF 200mm f/2.8 G APO + Minolta AF 1.4x APO or Other Lens + 1.4x"}, + {2590, "Minolta AF 600mm f/4 HS-APO G + Minolta AF 1.4x APO"}, + {2591, "Minolta AF 35mm f/1.4"}, + {2592, "Minolta AF 85mm f/1.4 G (D)"}, + {2593, "Minolta AF 200mm f/2.8 APO"}, + {2594, "Minolta AF 3x-1x f/1.7-2.8 Macro"}, + {2596, "Minolta AF 28mm f/2"}, + {2597, "Minolta AF 35mm f/2 [New]"}, + {2598, "Minolta AF 100mm f/2"}, + {2601, "Minolta AF 200mm f/2.8 G APO + Minolta AF 2x APO or Other Lens + 2x"}, + {2601, "Minolta AF 600mm f/4 HS-APO G + Minolta AF 2x APO"}, + {2604, "Minolta AF 80-200mm f/4.5-5.6"}, + {2605, "Minolta AF 35-80mm f/4-5.6"}, + {2606, "Minolta AF 100-300mm f/4.5-5.6"}, + {2607, "Minolta AF 35-80mm f/4-5.6"}, + {2608, "Minolta AF 300mm f/2.8 HS-APO G"}, + {2609, "Minolta AF 600mm f/4 HS-APO G"}, + {2612, "Minolta AF 200mm f/2.8 HS-APO G"}, + {2613, "Minolta AF 50mm f/1.7 New"}, + {2615, "Minolta AF 28-105mm f/3.5-4.5 xi"}, + {2616, "Minolta AF 35-200mm f/4.5-5.6 xi"}, + {2618, "Minolta AF 28-80mm f/4-5.6 xi"}, + {2619, "Minolta AF 80-200mm f/4.5-5.6 xi"}, + {2620, "Minolta AF 28-70mm f/2.8 G"}, + {2621, "Minolta AF 100-300mm f/4.5-5.6 xi"}, + {2624, "Minolta AF 35-80mm f/4-5.6 Power Zoom"}, + {2628, "Minolta AF 80-200mm f/2.8 HS-APO G"}, + {2629, "Minolta AF 85mm f/1.4 New"}, + {2631, "Minolta/Sony AF 100-300mm f/4.5-5.6 APO"}, + {2632, "Minolta AF 24-50mm f/4 New"}, + {2638, "Minolta AF 50mm f/2.8 Macro New"}, + {2639, "Minolta AF 100mm f/2.8 Macro"}, + {2641, "Minolta/Sony AF 20mm f/2.8 New"}, + {2642, "Minolta AF 24mm f/2.8 New"}, + {2644, "Minolta AF 100-400mm f/4.5-6.7 APO"}, + {2662, "Minolta AF 50mm f/1.4 New"}, + {2667, "Minolta AF 35mm f/2 New"}, + {2668, "Minolta AF 28mm f/2 New"}, + {2672, "Minolta AF 24-105mm f/3.5-4.5 (D)"}, + {3046, "Metabones Canon EF Speed Booster"}, + {4567, "Tokina 70-210mm f/4-5.6"}, + {4571, "Vivitar 70-210mm f/4.5-5.6"}, + {4574, "2x Teleconverter or Tamron or Tokina Lens"}, + {4574, "Tamron SP AF 90mm f/2.5"}, + {4574, "Tokina RF 500mm f/8.0 x2"}, + {4574, "Tokina 300mm f/2.8 x2"}, + {4575, "1.4x Teleconverter"}, + {4585, "Tamron SP AF 300mm f/2.8 LD IF"}, + {4586, "Tamron SP AF 35-105mm f/2.8 LD Aspherical IF"}, + {4587, "Tamron AF 70-210mm f/2.8 SP LD"}, + {4812, "Metabones Canon EF Speed Booster Ultra"}, + {6118, "Canon EF Adapter"}, + {6553, "E-Mount, T-Mount, Other Lens or no lens"}, + {6553, "Sony E 16mm f/2.8"}, + {6553, "Sony E 18-55mm f/3.5-5.6 OSS"}, + {6553, "Sony E 55-210mm f/4.5-6.3 OSS"}, + {6553, "Sony E 18-200mm f/3.5-6.3 OSS"}, + {6553, "Sony E 30mm f/3.5 Macro"}, + {6553, "Sony E 24mm f/1.8 ZA"}, + {6553, "Sony E 50mm f/1.8 OSS"}, + {6553, "Sony E 16-70mm f/4 ZA OSS"}, + {6553, "Sony E 10-18mm f/4 OSS"}, + {6553, "Sony E PZ 16-50mm f/3.5-5.6 OSS"}, + {6553, "Sony FE 35mm f/2.8 ZA"}, + {6553, "Sony FE 24-70mm f/4 ZA OSS"}, + {6553, "Sony E 18-200mm f/3.5-6.3 OSS LE"}, + {6553, "Sony E 20mm f/2.8"}, + {6553, "Sony E 35mm f/1.8 OSS"}, + {6553, "Sony E PZ 18-105mm f/4 G OSS"}, + {6553, "Sony FE 90mm f/2.8 Macro G OSS"}, + {6553, "Sony E 18-50mm f/4-5.6"}, + {6553, "Sony E PZ 18-200mm f/3.5-6.3 OSS"}, + {6553, "Sony FE 55mm f/1.8 ZA"}, + {6553, "Sony FE 70-200mm f/4 G OSS"}, + {6553, "Sony FE 16-35mm f/4 ZA OSS"}, + {6553, "Sony FE 28-70mm f/3.5-5.6 OSS"}, + {6553, "Sony FE 35mm f/1.4 ZA"}, + {6553, "Sony FE 24-240mm f/3.5-6.3 OSS"}, + {6553, "Sony FE 28mm f/2"}, + {6553, "Sony FE PZ 28-135mm f/4 G OSS"}, + {6553, "Sony FE 24-70mm f/2.8 GM"}, + {6553, "Sony FE 85mm f/1.4 GM"}, + {6553, "Sony FE 50mm f/1.8"}, + {6553, "Sony FE 21mm f/2.8 (SEL28F20 + SEL075UWC)"}, + {6553, "Sony FE 16mm f/3.5 Fisheye (SEL28F20 + SEL057FEC)"}, + {6553, "Sony FE 70-300mm f/4.5-5.6 G OSS"}, + {6553, "Sony FE 70-200mm f/2.8 GM OSS"}, + {6553, "Sigma 19mm f/2.8 [EX] DN"}, + {6553, "Sigma 30mm f/2.8 [EX] DN"}, + {6553, "Sigma 60mm f/2.8 DN"}, + {6553, "Sigma 30mm f/1.4 DC DN | C"}, + {6553, "Tamron 18-200mm f/3.5-6.3 Di III VC"}, + {6553, "Zeiss Batis 25mm f/2"}, + {6553, "Zeiss Batis 85mm f/1.8"}, + {6553, "Zeiss Batis 18mm f/2.8"}, + {6553, "Zeiss Loxia 21mm f/2.8"}, + {6553, "Zeiss Loxia 35mm f/2"}, + {6553, "Zeiss Loxia 50mm f/2"}, + {6553, "Zeiss Touit 12mm f/2.8"}, + {6553, "Zeiss Touit 32mm f/1.8"}, + {6553, "Zeiss Touit 50mm f/2.8 Macro"}, + {6553, "Arax MC 35mm f/2.8 Tilt+Shift"}, + {6553, "Arax MC 80mm f/2.8 Tilt+Shift"}, + {6553, "Zenitar MF 16mm f/2.8 Fisheye M42"}, + {6553, "Samyang 500mm Mirror f/8.0"}, + {6553, "Pentacon Auto 135mm f/2.8"}, + {6553, "Pentacon Auto 29mm f/2.8"}, + {6553, "Helios 44-2 58mm f/2.0"}, + {18688, "Sigma MC-11 Adapter"}, + {25501, "Minolta AF 50mm f/1.7"}, + {25511, "Minolta AF 35-70mm f/4 or Other Lens"}, + {25511, "Sigma UC AF 28-70mm f/3.5-4.5"}, + {25511, "Sigma AF 28-70mm f/2.8"}, + {25511, "Sigma M-AF 70-200mm f/2.8 EX Aspherical"}, + {25511, "Quantaray M-AF 35-80mm f/4-5.6"}, + {25511, "Tokina 28-70mm f/2.8-4.5 AF"}, + {25521, "Minolta AF 28-85mm f/3.5-4.5 or Other Lens"}, + {25521, "Tokina 19-35mm f/3.5-4.5"}, + {25521, "Tokina 28-70mm f/2.8 AT-X"}, + {25521, "Tokina 80-400mm f/4.5-5.6 AT-X AF II 840"}, + {25521, "Tokina AF PRO 28-80mm f/2.8 AT-X 280"}, + {25521, "Tokina AT-X PRO [II] AF 28-70mm f/2.6-2.8 270"}, + {25521, "Tamron AF 19-35mm f/3.5-4.5"}, + {25521, "Angenieux AF 28-70mm f/2.6"}, + {25521, "Tokina AT-X 17 AF 17mm f/3.5"}, + {25521, "Tokina 20-35mm f/3.5-4.5 II AF"}, + {25531, "Minolta AF 28-135mm f/4-4.5 or Sigma Lens"}, + {25531, "Sigma ZOOM-alpha 35-135mm f/3.5-4.5"}, + {25531, "Sigma 28-105mm f/2.8-4 Aspherical"}, + {25531, "Sigma 28-105mm f/4-5.6 UC"}, + {25541, "Minolta AF 35-105mm f/3.5-4.5"}, + {25551, "Minolta AF 70-210mm f/4 Macro or Sigma Lens"}, + {25551, "Sigma 70-210mm f/4-5.6 APO"}, + {25551, "Sigma M-AF 70-200mm f/2.8 EX APO"}, + {25551, "Sigma 75-200mm f/2.8-3.5"}, + {25561, "Minolta AF 135mm f/2.8"}, + {25571, "Minolta/Sony AF 28mm f/2.8"}, + {25581, "Minolta AF 24-50mm f/4"}, + {25601, "Minolta AF 100-200mm f/4.5"}, + {25611, "Minolta AF 75-300mm f/4.5-5.6 or Sigma Lens"}, + {25611, "Sigma 70-300mm f/4-5.6 DL Macro"}, + {25611, "Sigma 300mm f/4 APO Macro"}, + {25611, "Sigma AF 500mm f/4.5 APO"}, + {25611, "Sigma AF 170-500mm f/5-6.3 APO Aspherical"}, + {25611, "Tokina AT-X AF 300mm f/4"}, + {25611, "Tokina AT-X AF 400mm f/5.6 SD"}, + {25611, "Tokina AF 730 II 75-300mm f/4.5-5.6"}, + {25611, "Sigma 800mm f/5.6 APO"}, + {25611, "Sigma AF 400mm f/5.6 APO Macro"}, + {25621, "Minolta AF 50mm f/1.4 [New]"}, + {25631, "Minolta AF 300mm f/2.8 APO or Sigma Lens"}, + {25631, "Sigma AF 50-500mm f/4-6.3 EX DG APO"}, + {25631, "Sigma AF 170-500mm f/5-6.3 APO Aspherical"}, + {25631, "Sigma AF 500mm f/4.5 EX DG APO"}, + {25631, "Sigma 400mm f/5.6 APO"}, + {25641, "Minolta AF 50mm f/2.8 Macro or Sigma Lens"}, + {25641, "Sigma 50mm f/2.8 EX Macro"}, + {25651, "Minolta AF 600mm f/4 APO"}, + {25661, "Minolta AF 24mm f/2.8 or Sigma Lens"}, + {25661, "Sigma 17-35mm f/2.8-4 EX Aspherical"}, + {25721, "Minolta/Sony AF 500mm f/8 Reflex"}, + {25781, "Minolta/Sony AF 16mm f/2.8 Fisheye or Sigma Lens"}, + {25781, "Sigma 8mm f/4 EX [DG] Fisheye"}, + {25781, "Sigma 14mm f/3.5"}, + {25781, "Sigma 15mm f/2.8 Fisheye"}, + {25791, "Minolta/Sony AF 20mm f/2.8 or Tokina Lens"}, + {25791, "Tokina AT-X Pro DX 11-16mm f/2.8"}, + {25811, "Minolta AF 100mm f/2.8 Macro [New] or Sigma or Tamron Lens"}, + {25811, "Sigma AF 90mm f/2.8 Macro"}, + {25811, "Sigma AF 105mm f/2.8 EX [DG] Macro"}, + {25811, "Sigma 180mm f/5.6 Macro"}, + {25811, "Sigma 180mm f/3.5 EX DG Macro"}, + {25811, "Tamron 90mm f/2.8 Macro"}, + {25851, "Beroflex 35-135mm f/3.5-4.5"}, + {25858, "Minolta AF 35-105mm f/3.5-4.5 New or Tamron Lens"}, + {25858, "Tamron 24-135mm f/3.5-5.6"}, + {25881, "Minolta AF 70-210mm f/3.5-4.5"}, + {25891, "Minolta AF 80-200mm f/2.8 APO or Tokina Lens"}, + {25891, "Tokina 80-200mm f/2.8"}, + {25901, "Minolta AF 200mm f/2.8 G APO + Minolta AF 1.4x APO or Other Lens + 1.4x"}, + {25901, "Minolta AF 600mm f/4 HS-APO G + Minolta AF 1.4x APO"}, + {25911, "Minolta AF 35mm f/1.4"}, + {25921, "Minolta AF 85mm f/1.4 G (D)"}, + {25931, "Minolta AF 200mm f/2.8 APO"}, + {25941, "Minolta AF 3x-1x f/1.7-2.8 Macro"}, + {25961, "Minolta AF 28mm f/2"}, + {25971, "Minolta AF 35mm f/2 [New]"}, + {25981, "Minolta AF 100mm f/2"}, + {26011, "Minolta AF 200mm f/2.8 G APO + Minolta AF 2x APO or Other Lens + 2x"}, + {26011, "Minolta AF 600mm f/4 HS-APO G + Minolta AF 2x APO"}, + {26041, "Minolta AF 80-200mm f/4.5-5.6"}, + {26051, "Minolta AF 35-80mm f/4-5.6"}, + {26061, "Minolta AF 100-300mm f/4.5-5.6"}, + {26071, "Minolta AF 35-80mm f/4-5.6"}, + {26081, "Minolta AF 300mm f/2.8 HS-APO G"}, + {26091, "Minolta AF 600mm f/4 HS-APO G"}, + {26121, "Minolta AF 200mm f/2.8 HS-APO G"}, + {26131, "Minolta AF 50mm f/1.7 New"}, + {26151, "Minolta AF 28-105mm f/3.5-4.5 xi"}, + {26161, "Minolta AF 35-200mm f/4.5-5.6 xi"}, + {26181, "Minolta AF 28-80mm f/4-5.6 xi"}, + {26191, "Minolta AF 80-200mm f/4.5-5.6 xi"}, + {26201, "Minolta AF 28-70mm f/2.8 G"}, + {26211, "Minolta AF 100-300mm f/4.5-5.6 xi"}, + {26241, "Minolta AF 35-80mm f/4-5.6 Power Zoom"}, + {26281, "Minolta AF 80-200mm f/2.8 HS-APO G"}, + {26291, "Minolta AF 85mm f/1.4 New"}, + {26311, "Minolta/Sony AF 100-300mm f/4.5-5.6 APO"}, + {26321, "Minolta AF 24-50mm f/4 New"}, + {26381, "Minolta AF 50mm f/2.8 Macro New"}, + {26391, "Minolta AF 100mm f/2.8 Macro"}, + {26411, "Minolta/Sony AF 20mm f/2.8 New"}, + {26421, "Minolta AF 24mm f/2.8 New"}, + {26441, "Minolta AF 100-400mm f/4.5-6.7 APO"}, + {26621, "Minolta AF 50mm f/1.4 New"}, + {26671, "Minolta AF 35mm f/2 New"}, + {26681, "Minolta AF 28mm f/2 New"}, + {26721, "Minolta AF 24-105mm f/3.5-4.5 (D)"}, + {30464, "Metabones Canon EF Speed Booster"}, + {45671, "Tokina 70-210mm f/4-5.6"}, + {45711, "Vivitar 70-210mm f/4.5-5.6"}, + {45741, "2x Teleconverter or Tamron or Tokina Lens"}, + {45741, "Tamron SP AF 90mm f/2.5"}, + {45741, "Tokina RF 500mm f/8.0 x2"}, + {45741, "Tokina 300mm f/2.8 x2"}, + {45751, "1.4x Teleconverter"}, + {45851, "Tamron SP AF 300mm f/2.8 LD IF"}, + {45861, "Tamron SP AF 35-105mm f/2.8 LD Aspherical IF"}, + {45871, "Tamron AF 70-210mm f/2.8 SP LD"}, + {48128, "Metabones Canon EF Speed Booster Ultra"}, + {61184, "Canon EF Adapter"}, + {65535, "E-Mount, T-Mount, Other Lens or no lens"}, + {65535, "Sony E 16mm f/2.8"}, + {65535, "Sony E 18-55mm f/3.5-5.6 OSS"}, + {65535, "Sony E 55-210mm f/4.5-6.3 OSS"}, + {65535, "Sony E 18-200mm f/3.5-6.3 OSS"}, + {65535, "Sony E 30mm f/3.5 Macro"}, + {65535, "Sony E 24mm f/1.8 ZA"}, + {65535, "Sony E 50mm f/1.8 OSS"}, + {65535, "Sony E 16-70mm f/4 ZA OSS"}, + {65535, "Sony E 10-18mm f/4 OSS"}, + {65535, "Sony E PZ 16-50mm f/3.5-5.6 OSS"}, + {65535, "Sony FE 35mm f/2.8 ZA"}, + {65535, "Sony FE 24-70mm f/4 ZA OSS"}, + {65535, "Sony E 18-200mm f/3.5-6.3 OSS LE"}, + {65535, "Sony E 20mm f/2.8"}, + {65535, "Sony E 35mm f/1.8 OSS"}, + {65535, "Sony E PZ 18-105mm f/4 G OSS"}, + {65535, "Sony FE 90mm f/2.8 Macro G OSS"}, + {65535, "Sony E 18-50mm f/4-5.6"}, + {65535, "Sony E PZ 18-200mm f/3.5-6.3 OSS"}, + {65535, "Sony FE 55mm f/1.8 ZA"}, + {65535, "Sony FE 70-200mm f/4 G OSS"}, + {65535, "Sony FE 16-35mm f/4 ZA OSS"}, + {65535, "Sony FE 28-70mm f/3.5-5.6 OSS"}, + {65535, "Sony FE 35mm f/1.4 ZA"}, + {65535, "Sony FE 24-240mm f/3.5-6.3 OSS"}, + {65535, "Sony FE 28mm f/2"}, + {65535, "Sony FE PZ 28-135mm f/4 G OSS"}, + {65535, "Sony FE 24-70mm f/2.8 GM"}, + {65535, "Sony FE 85mm f/1.4 GM"}, + {65535, "Sony FE 50mm f/1.8"}, + {65535, "Sony FE 21mm f/2.8 (SEL28F20 + SEL075UWC)"}, + {65535, "Sony FE 16mm f/3.5 Fisheye (SEL28F20 + SEL057FEC)"}, + {65535, "Sony FE 70-300mm f/4.5-5.6 G OSS"}, + {65535, "Sony FE 70-200mm f/2.8 GM OSS"}, + {65535, "Sigma 19mm f/2.8 [EX] DN"}, + {65535, "Sigma 30mm f/2.8 [EX] DN"}, + {65535, "Sigma 60mm f/2.8 DN"}, + {65535, "Sigma 30mm f/1.4 DC DN | C"}, + {65535, "Tamron 18-200mm f/3.5-6.3 Di III VC"}, + {65535, "Zeiss Batis 25mm f/2"}, + {65535, "Zeiss Batis 85mm f/1.8"}, + {65535, "Zeiss Batis 18mm f/2.8"}, + {65535, "Zeiss Loxia 21mm f/2.8"}, + {65535, "Zeiss Loxia 35mm f/2"}, + {65535, "Zeiss Loxia 50mm f/2"}, + {65535, "Zeiss Touit 12mm f/2.8"}, + {65535, "Zeiss Touit 32mm f/1.8"}, + {65535, "Zeiss Touit 50mm f/2.8 Macro"}, + {65535, "Arax MC 35mm f/2.8 Tilt+Shift"}, + {65535, "Arax MC 80mm f/2.8 Tilt+Shift"}, + {65535, "Zenitar MF 16mm f/2.8 Fisheye M42"}, + {65535, "Samyang 500mm Mirror f/8.0"}, + {65535, "Pentacon Auto 135mm f/2.8"}, + {65535, "Pentacon Auto 29mm f/2.8"}, + {65535, "Helios 44-2 58mm f/2.0"} + }; } virtual std::string toString (Tag* t) @@ -1067,7 +1069,7 @@ public: focalLength = focalLengthTag->toDouble(); } - double *liArray = NULL; + double *liArray = nullptr; if (lensInfoTag) { liArray = lensInfoTag->toDoubleArray(); @@ -1173,7 +1175,7 @@ public: focalLength = focalLengthTag->toDouble(); } - double *liArray = NULL; + double *liArray = nullptr; if (lensInfoTag) { liArray = lensInfoTag->toDoubleArray(); @@ -1966,7 +1968,7 @@ public: { // Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT TagType astype = t->getType(); - int a; + int a = 0; if (astype == BYTE) { a = t->getValue()[ofs]; @@ -1975,7 +1977,7 @@ public: } // Decode the value - if(a > 0.) { + if(a > 0) { return pow(2., 6. - (double(a) / 8.)); } else { return 0.; @@ -1984,7 +1986,7 @@ public: virtual int toInt (Tag* t, int ofs, TagType astype) { // Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT - int a; + int a = 0; if (astype == INVALID || astype == AUTO) { astype = t->getType(); @@ -2026,7 +2028,7 @@ public: { // Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT TagType astype = t->getType(); - int a; + int a = 0; if (astype == BYTE) { a = t->getValue()[ofs]; @@ -2035,7 +2037,7 @@ public: } // Decode the value - if(a > 0.) { + if(a > 0) { return pow(2., (double(a) / 8. - 1.) / 2.); } else { return 0.; @@ -2044,7 +2046,7 @@ public: virtual int toInt (Tag* t, int ofs, TagType astype) { // Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT - int a; + int a = 0; if (astype == INVALID || astype == AUTO) { astype = t->getType(); @@ -2085,7 +2087,7 @@ public: virtual int toInt (Tag* t, int ofs, TagType astype) { // Get the value; Depending on the camera model, this parameter can be a BYTE or a SHORT - int a; + int a = 0; if (astype == INVALID || astype == AUTO) { astype = t->getType(); @@ -2235,7 +2237,7 @@ public: } virtual int toInt (Tag* t, int ofs, TagType astype) { - int a; + int a = 0; if (astype == INVALID || astype == AUTO) { astype = t->getType(); @@ -2253,226 +2255,226 @@ public: SAColorTemperatureSettingInterpreter saColorTemperatureSettingInterpreter; const TagAttrib minoltaAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "MakerNoteVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0001, AUTO, "MinoltaCameraSettingsOld", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0003, AUTO, "MinoltaCameraSettings", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0004, AUTO, "MinoltaCameraSettings7D", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0018, AUTO, "ImageStabilization", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0040, AUTO, "CompressedImageSize", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0081, AUTO, "PreviewImage", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0088, AUTO, "PreviewImageStart", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0089, AUTO, "PreviewImageLength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0100, AUTO, "SceneMode", &saSceneModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0101, AUTO, "ColorMode", &saColorModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0102, AUTO, "MinoltaQuality", &maQualityInterpreter}, - {0, AC_WRITE, 0, 0, 0x0103, AUTO, "MinoltaImageSize", &maImageSizeInterpreter}, - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0105, AUTO, "Teleconverter", &maTeleconverterInterpreter}, - {0, AC_WRITE, 0, 0, 0x0107, AUTO, "ImageStabilization", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x010a, AUTO, "ZoneMatching", &saZoneMatchingInterpreter}, - {0, AC_WRITE, 0, 0, 0x010b, AUTO, "ColorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010c, AUTO, "LensID", &saLensIDInterpreter}, - {0, AC_WRITE, 0, 0, 0x0113, AUTO, "ImageStabilization", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0x0114, AUTO, "MinoltaCameraSettings", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0f00, AUTO, "MinoltaCameraSettings2", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "MakerNoteVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "MinoltaCameraSettingsOld", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "MinoltaCameraSettings", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0004, AUTO, "MinoltaCameraSettings7D", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0018, AUTO, "ImageStabilization", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0040, AUTO, "CompressedImageSize", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0081, AUTO, "PreviewImage", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0088, AUTO, "PreviewImageStart", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0089, AUTO, "PreviewImageLength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0100, AUTO, "SceneMode", &saSceneModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0101, AUTO, "ColorMode", &saColorModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0102, AUTO, "MinoltaQuality", &maQualityInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0103, AUTO, "MinoltaImageSize", &maImageSizeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0105, AUTO, "Teleconverter", &maTeleconverterInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0107, AUTO, "ImageStabilization", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010a, AUTO, "ZoneMatching", &saZoneMatchingInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010b, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010c, AUTO, "LensID", &saLensIDInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0113, AUTO, "ImageStabilization", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0114, AUTO, "MinoltaCameraSettings", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0f00, AUTO, "MinoltaCameraSettings2", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyAttribs[] = { {0, AC_WRITE, 0, sonyCameraInfoAttribs, 0x0010, AUTO, "CameraInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0102, AUTO, "Quality", &maQualityInterpreter}, - {0, AC_WRITE, 0, 0, 0x0104, AUTO, "FlashExposureComp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0106, AUTO, "TeleConverter", &maTeleconverterInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0102, AUTO, "Quality", &maQualityInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0104, AUTO, "FlashExposureComp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0106, AUTO, "TeleConverter", &maTeleconverterInterpreter}, {0, AC_WRITE, 0, sonyCameraSettingsAttribs, 0x0114, AUTO, "SonyCameraSettings", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0115, AUTO, "WhiteBalance", &saWhiteBalanceInterpreter}, - {1, AC_WRITE, 0, 0, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, - {1, AC_WRITE, 0, 0, 0x2001, AUTO, "PreviewImage", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x2009, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction}, - {0, AC_WRITE, 0, 0, 0x200a, AUTO, "AutoHDR", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x200b, AUTO, "MultiFrameNoiseReduction", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x200e, AUTO, "PictureEffect", &saPictureEffectInterpreter}, - {0, AC_WRITE, 0, 0, 0x2011, AUTO, "VignettingCorrection", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x2012, AUTO, "LateralChromaticAberration", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x2013, AUTO, "DistortionCorrection", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb020, AUTO, "ColorReproduction", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb021, AUTO, "ColorTemperature", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb022, AUTO, "ColorCompensationFilter", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb023, AUTO, "SceneMode", &saSceneModeInterpreter}, - {0, AC_WRITE, 0, 0, 0xb024, AUTO, "ZoneMatching", &saZoneMatchingInterpreter}, - {0, AC_WRITE, 0, 0, 0xb025, AUTO, "DynamicRangeOptimizer", &saDynamicRangeOptimizerInterpreter}, - {0, AC_WRITE, 0, 0, 0xb026, AUTO, "ImageStabilization", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0xb027, AUTO, "LensID", &saLensIDInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0115, AUTO, "WhiteBalance", &saWhiteBalanceInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + {1, AC_WRITE, 0, nullptr, 0x2001, AUTO, "PreviewImage", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x2009, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction}, + {0, AC_WRITE, 0, nullptr, 0x200a, AUTO, "AutoHDR", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x200b, AUTO, "MultiFrameNoiseReduction", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x200e, AUTO, "PictureEffect", &saPictureEffectInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x2011, AUTO, "VignettingCorrection", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x2012, AUTO, "LateralChromaticAberration", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x2013, AUTO, "DistortionCorrection", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb020, AUTO, "ColorReproduction", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb021, AUTO, "ColorTemperature", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb022, AUTO, "ColorCompensationFilter", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb023, AUTO, "SceneMode", &saSceneModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb024, AUTO, "ZoneMatching", &saZoneMatchingInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb025, AUTO, "DynamicRangeOptimizer", &saDynamicRangeOptimizerInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb026, AUTO, "ImageStabilization", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb027, AUTO, "LensID", &saLensIDInterpreter}, {0, AC_WRITE, 0, minoltaAttribs, 0xb028, AUTO, "MinoltaMakerNote", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb029, AUTO, "ColorMode", &saColorModeInterpreter}, - {0, AC_WRITE, 0, 0, 0xb040, AUTO, "Macro", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0xb041, AUTO, "ExposureMode", &saExposureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0xb042, AUTO, "FocusMode", &saFocusMode}, - {0, AC_WRITE, 0, 0, 0xb043, AUTO, "AFMode", &saAFMode}, - {0, AC_WRITE, 0, 0, 0xb044, AUTO, "AFIlluminator", &saAFIlluminator}, - {0, AC_WRITE, 0, 0, 0xb047, AUTO, "Quality", &saQualityInterpreter}, - {0, AC_WRITE, 0, 0, 0xb048, AUTO, "FlashLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb049, AUTO, "ReleaseMode", &saReleaseModeInterpreter}, - {0, AC_WRITE, 0, 0, 0xb04a, AUTO, "SequenceNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb04b, AUTO, "AntiBlur", &saAntiBlurInterpreter}, - {0, AC_WRITE, 0, 0, 0xb04e, AUTO, "LongExposureNoiseReduction", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 0xb04f, AUTO, "DynamicRangeOptimizer", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xb050, AUTO, "HighISONoiseReduction2", &saHighISONoiseReduction2}, - {0, AC_WRITE, 0, 0, 0xb052, AUTO, "IntelligentAuto", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb029, AUTO, "ColorMode", &saColorModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb040, AUTO, "Macro", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb041, AUTO, "ExposureMode", &saExposureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb042, AUTO, "FocusMode", &saFocusMode}, + {0, AC_WRITE, 0, nullptr, 0xb043, AUTO, "AFMode", &saAFMode}, + {0, AC_WRITE, 0, nullptr, 0xb044, AUTO, "AFIlluminator", &saAFIlluminator}, + {0, AC_WRITE, 0, nullptr, 0xb047, AUTO, "Quality", &saQualityInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb048, AUTO, "FlashLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb049, AUTO, "ReleaseMode", &saReleaseModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb04a, AUTO, "SequenceNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb04b, AUTO, "AntiBlur", &saAntiBlurInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb04e, AUTO, "LongExposureNoiseReduction", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb04f, AUTO, "DynamicRangeOptimizer", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xb050, AUTO, "HighISONoiseReduction2", &saHighISONoiseReduction2}, + {0, AC_WRITE, 0, nullptr, 0xb052, AUTO, "IntelligentAuto", &stdInterpreter}, {0, AC_WRITE, 0, sonyTag9405Attribs, 0x9405, AUTO, "Tag9405", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyTag9405Attribs[] = { - {0, AC_WRITE, 0, 0, 0x005d, AUTO, "LensFormat", &stdInterpreter}, // 9405b start here - {0, AC_WRITE, 0, 0, 0x005e, AUTO, "LensMount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0060, SHORT, "LensType2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0062, SHORT, "LensType", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0603, AUTO, "LensFormat", &stdInterpreter}, // 9405a start here - {0, AC_WRITE, 0, 0, 0x0604, AUTO, "LensMount", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0605, SHORT, "LensType2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0608, SHORT, "LensType", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0x005d, AUTO, "LensFormat", &stdInterpreter}, // 9405b start here + {0, AC_WRITE, 0, nullptr, 0x005e, AUTO, "LensMount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0060, SHORT, "LensType2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0062, SHORT, "LensType", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0603, AUTO, "LensFormat", &stdInterpreter}, // 9405a start here + {0, AC_WRITE, 0, nullptr, 0x0604, AUTO, "LensMount", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0605, SHORT, "LensType2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0608, SHORT, "LensType", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyCameraInfoAttribs[] = { - {0, AC_WRITE, 0, 0, 14, SHORT, "FocalLength", &saExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 16, SHORT, "FocalLengthTeleZoom", &saExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 25, AUTO, "FocusStatus", &saCameraInfoFocusStatusInterpreter}, - {0, AC_WRITE, 0, 0, 28, AUTO, "AFPointSelected", &saCameraInfoAFPointSelected}, - {0, AC_WRITE, 0, 0, 29, AUTO, "FocusMode", &saFocusMode2}, - {0, AC_WRITE, 0, 0, 32, AUTO, "AFPoint", &saCameraInfoAFPoint}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 14, SHORT, "FocalLength", &saExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 16, SHORT, "FocalLengthTeleZoom", &saExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 25, AUTO, "FocusStatus", &saCameraInfoFocusStatusInterpreter}, + {0, AC_WRITE, 0, nullptr, 28, AUTO, "AFPointSelected", &saCameraInfoAFPointSelected}, + {0, AC_WRITE, 0, nullptr, 29, AUTO, "FocusMode", &saFocusMode2}, + {0, AC_WRITE, 0, nullptr, 32, AUTO, "AFPoint", &saCameraInfoAFPoint}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyCameraInfo2Attribs[] = { - {0, AC_WRITE, 0, 0, 304, AUTO, "AFMicroAdjValue", &saAFMicroAdjValueInterpreter}, - {0, AC_WRITE, 0, 0, 305, AUTO, "AFMicroAdjMode", &saAFMicroAdjModeInterpreter}, - {0, AC_WRITE, 0, 0, 305, AUTO, "AFMicroAdjRegisteredLenses", &saAFMicroAdjRegisteredLensesInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 304, AUTO, "AFMicroAdjValue", &saAFMicroAdjValueInterpreter}, + {0, AC_WRITE, 0, nullptr, 305, AUTO, "AFMicroAdjMode", &saAFMicroAdjModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 305, AUTO, "AFMicroAdjRegisteredLenses", &saAFMicroAdjRegisteredLensesInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyCameraSettingsAttribs[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "ExposureTime", &saExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "FNumber", &saFNumberInterpreter}, - {0, AC_WRITE, 0, 0, 4, AUTO, "DriveMode", &saDriveMode}, - {0, AC_WRITE, 0, 0, 6, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 16, AUTO, "FocusModeSetting", &saFocusMode}, - {0, AC_WRITE, 0, 0, 17, AUTO, "AFAreaMode", &saAFAreaMode}, - {0, AC_WRITE, 0, 0, 18, AUTO, "AFPointSelected", &saAFPointSelected}, - {0, AC_WRITE, 0, 0, 21, AUTO, "MeteringMode", &saMeteringMode1_4}, - {0, AC_WRITE, 0, 0, 22, AUTO, "ISOSetting", &saISOSettingInterpreter}, - {0, AC_WRITE, 0, 0, 24, AUTO, "DynamicRangeOptimizerMode", &saDynamicRangeOptimizerMode}, - {0, AC_WRITE, 0, 0, 25, AUTO, "DynamicRangeOptimizerLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 26, AUTO, "CreativeStyle", &saCreativeStyle}, - {0, AC_WRITE, 0, 0, 28, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 29, AUTO, "Contrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 30, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 31, AUTO, "ZoneMatchingValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 34, AUTO, "Brightness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 35, AUTO, "FlashMode", &saFlashMode}, - {0, AC_WRITE, 0, 0, 40, AUTO, "PrioritySetupShutterRelease", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 41, AUTO, "AFIlluminator", &saAFIlluminator}, - {0, AC_WRITE, 0, 0, 42, AUTO, "AFWithShutter", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 43, AUTO, "LongExposureNoiseReduction", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 44, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction3}, - {0, AC_WRITE, 0, 0, 45, AUTO, "ImageStyle", &saImageStyleInterpreter}, - {0, AC_WRITE, 0, 0, 60, AUTO, "ExposureProgram", &saExposureProgram}, - {0, AC_WRITE, 0, 0, 61, AUTO, "ImageStabilization", &saOnOffInterpreter}, - {0, AC_WRITE, 0, 0, 63, AUTO, "Rotation", &saRotation}, - {0, AC_WRITE, 0, 0, 77, AUTO, "FocusMode", &saFocusMode}, - {0, AC_WRITE, 0, 0, 83, AUTO, "FocusStatus", &saFocusStatusInterpreter}, - {0, AC_WRITE, 0, 0, 84, AUTO, "SonyImageSize", &saSonyImageSize}, - {0, AC_WRITE, 0, 0, 85, AUTO, "AspectRatio", &saAspectRatio}, - {0, AC_WRITE, 0, 0, 86, AUTO, "Quality", &saQualityInterpreter2}, - {0, AC_WRITE, 0, 0, 88, AUTO, "ExposureLevelIncrements", &saExposureLevelIncrements}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "ExposureTime", &saExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "FNumber", &saFNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 4, AUTO, "DriveMode", &saDriveMode}, + {0, AC_WRITE, 0, nullptr, 6, AUTO, "WhiteBalanceFineTune", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 16, AUTO, "FocusModeSetting", &saFocusMode}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "AFAreaMode", &saAFAreaMode}, + {0, AC_WRITE, 0, nullptr, 18, AUTO, "AFPointSelected", &saAFPointSelected}, + {0, AC_WRITE, 0, nullptr, 21, AUTO, "MeteringMode", &saMeteringMode1_4}, + {0, AC_WRITE, 0, nullptr, 22, AUTO, "ISOSetting", &saISOSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 24, AUTO, "DynamicRangeOptimizerMode", &saDynamicRangeOptimizerMode}, + {0, AC_WRITE, 0, nullptr, 25, AUTO, "DynamicRangeOptimizerLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 26, AUTO, "CreativeStyle", &saCreativeStyle}, + {0, AC_WRITE, 0, nullptr, 28, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 29, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 30, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 31, AUTO, "ZoneMatchingValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 34, AUTO, "Brightness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 35, AUTO, "FlashMode", &saFlashMode}, + {0, AC_WRITE, 0, nullptr, 40, AUTO, "PrioritySetupShutterRelease", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 41, AUTO, "AFIlluminator", &saAFIlluminator}, + {0, AC_WRITE, 0, nullptr, 42, AUTO, "AFWithShutter", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 43, AUTO, "LongExposureNoiseReduction", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 44, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction3}, + {0, AC_WRITE, 0, nullptr, 45, AUTO, "ImageStyle", &saImageStyleInterpreter}, + {0, AC_WRITE, 0, nullptr, 60, AUTO, "ExposureProgram", &saExposureProgram}, + {0, AC_WRITE, 0, nullptr, 61, AUTO, "ImageStabilization", &saOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 63, AUTO, "Rotation", &saRotation}, + {0, AC_WRITE, 0, nullptr, 77, AUTO, "FocusMode", &saFocusMode}, + {0, AC_WRITE, 0, nullptr, 83, AUTO, "FocusStatus", &saFocusStatusInterpreter}, + {0, AC_WRITE, 0, nullptr, 84, AUTO, "SonyImageSize", &saSonyImageSize}, + {0, AC_WRITE, 0, nullptr, 85, AUTO, "AspectRatio", &saAspectRatio}, + {0, AC_WRITE, 0, nullptr, 86, AUTO, "Quality", &saQualityInterpreter2}, + {0, AC_WRITE, 0, nullptr, 88, AUTO, "ExposureLevelIncrements", &saExposureLevelIncrements}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyCameraSettingsAttribs2[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "ExposureTime", &saExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "FNumber", &saFNumberInterpreter}, - {0, AC_WRITE, 0, 0, 11, AUTO, "ColorTemperatureSetting", &saColorTemperatureSettingInterpreter}, - {0, AC_WRITE, 0, 0, 15, AUTO, "FocusMode", &saFocusMode2}, - {0, AC_WRITE, 0, 0, 16, AUTO, "AFAreaMode", &saAFAreaMode}, - {0, AC_WRITE, 0, 0, 17, AUTO, "AFPointSelected", &saAFPointSelected2}, - {0, AC_WRITE, 0, 0, 19, AUTO, "MeteringMode", &saMeteringMode1_4}, - {0, AC_WRITE, 0, 0, 20, AUTO, "ISOSetting", &saISOSettingInterpreter}, - {0, AC_WRITE, 0, 0, 22, AUTO, "DynamicRangeOptimizerMode", &saDynamicRangeOptimizerMode}, - {0, AC_WRITE, 0, 0, 23, AUTO, "DynamicRangeOptimizerLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 24, AUTO, "CreativeStyle", &saCreativeStyle2}, - {0, AC_WRITE, 0, 0, 25, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 26, AUTO, "Contrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 27, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 35, AUTO, "FlashMode", &saFlashMode}, - {0, AC_WRITE, 0, 0, 38, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction4}, - {0, AC_WRITE, 0, 0, 60, AUTO, "ExposureProgram", &saExposureProgram}, - {0, AC_WRITE, 0, 0, 63, AUTO, "Rotation", &saRotation}, - {0, AC_WRITE, 0, 0, 83, AUTO, "FocusStatus", &saFocusStatusInterpreter}, - {0, AC_WRITE, 0, 0, 84, AUTO, "SonyImageSize", &saSonyImageSize}, - {0, AC_WRITE, 0, 0, 85, AUTO, "AspectRatio", &saAspectRatio}, - {0, AC_WRITE, 0, 0, 86, AUTO, "Quality", &saQualityInterpreter2}, - {0, AC_WRITE, 0, 0, 88, AUTO, "ExposureLevelIncrements", &saExposureLevelIncrements}, - {0, AC_WRITE, 0, 0, 126, AUTO, "DriveMode", &saDriveMode2}, - {0, AC_WRITE, 0, 0, 131, AUTO, "ColorSpace", &saColorSpace5_6}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "ExposureTime", &saExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "FNumber", &saFNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 11, AUTO, "ColorTemperatureSetting", &saColorTemperatureSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 15, AUTO, "FocusMode", &saFocusMode2}, + {0, AC_WRITE, 0, nullptr, 16, AUTO, "AFAreaMode", &saAFAreaMode}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "AFPointSelected", &saAFPointSelected2}, + {0, AC_WRITE, 0, nullptr, 19, AUTO, "MeteringMode", &saMeteringMode1_4}, + {0, AC_WRITE, 0, nullptr, 20, AUTO, "ISOSetting", &saISOSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 22, AUTO, "DynamicRangeOptimizerMode", &saDynamicRangeOptimizerMode}, + {0, AC_WRITE, 0, nullptr, 23, AUTO, "DynamicRangeOptimizerLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 24, AUTO, "CreativeStyle", &saCreativeStyle2}, + {0, AC_WRITE, 0, nullptr, 25, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 26, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 27, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 35, AUTO, "FlashMode", &saFlashMode}, + {0, AC_WRITE, 0, nullptr, 38, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction4}, + {0, AC_WRITE, 0, nullptr, 60, AUTO, "ExposureProgram", &saExposureProgram}, + {0, AC_WRITE, 0, nullptr, 63, AUTO, "Rotation", &saRotation}, + {0, AC_WRITE, 0, nullptr, 83, AUTO, "FocusStatus", &saFocusStatusInterpreter}, + {0, AC_WRITE, 0, nullptr, 84, AUTO, "SonyImageSize", &saSonyImageSize}, + {0, AC_WRITE, 0, nullptr, 85, AUTO, "AspectRatio", &saAspectRatio}, + {0, AC_WRITE, 0, nullptr, 86, AUTO, "Quality", &saQualityInterpreter2}, + {0, AC_WRITE, 0, nullptr, 88, AUTO, "ExposureLevelIncrements", &saExposureLevelIncrements}, + {0, AC_WRITE, 0, nullptr, 126, AUTO, "DriveMode", &saDriveMode2}, + {0, AC_WRITE, 0, nullptr, 131, AUTO, "ColorSpace", &saColorSpace5_6}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; const TagAttrib sonyCameraSettingsAttribs3[] = { - {0, AC_WRITE, 0, 0, 0, AUTO, "ShutterSpeedSetting", &saExposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 1, AUTO, "ApertureSetting", &saFNumberInterpreter}, - {0, AC_WRITE, 0, 0, 2, AUTO, "ISOSetting", &saISOSettingInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "ExposureCompensationSet", &saExposureCompSetInterpreter}, - {0, AC_WRITE, 0, 0, 3, AUTO, "DriveModeSetting", &saDriveMode3}, - {0, AC_WRITE, 0, 0, 5, AUTO, "ExposureProgram", &saExposureProgram2}, - {0, AC_WRITE, 0, 0, 6, AUTO, "FocusModeSetting", &saFocusModeSetting3}, - {0, AC_WRITE, 0, 0, 7, AUTO, "MeteringMode", &saMeteringMode1_3}, - {0, AC_WRITE, 0, 0, 9, AUTO, "SonyImageSize", &saSonyImageSize3}, - {0, AC_WRITE, 0, 0, 10, AUTO, "AspectRatio", &saAspectRatio2}, - {0, AC_WRITE, 0, 0, 11, AUTO, "Quality", &saQualityInterpreter3}, - {0, AC_WRITE, 0, 0, 12, AUTO, "DynamicRangeOptimizerSetting", &saDynamicRangeOptimizerSetting}, - {0, AC_WRITE, 0, 0, 14, AUTO, "ColorSpace", &saColorSpace1_2}, - {0, AC_WRITE, 0, 0, 15, AUTO, "CreativeStyleSetting", &saCreativeStyleSetting}, - {0, AC_WRITE, 0, 0, 16, AUTO, "Contrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 17, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 18, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 22, AUTO, "WhiteBalance", &saWhiteBalanceSettingInterpreter}, - {0, AC_WRITE, 0, 0, 23, AUTO, "ColorTemperatureSetting", &saColorTemperatureSettingInterpreter}, - {0, AC_WRITE, 0, 0, 23, AUTO, "ColorCompensationFilterSet", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 32, AUTO, "FlashMode", &saFlashMode2}, - {0, AC_WRITE, 0, 0, 33, AUTO, "FlashControl", &saFlashControl}, - {0, AC_WRITE, 0, 0, 35, AUTO, "FlashExposureCompSet", &saExposureCompSetInterpreter}, - {0, AC_WRITE, 0, 0, 36, AUTO, "AFAreaMode", &saAFAreaMode2}, - {0, AC_WRITE, 0, 0, 37, AUTO, "LongExposureNoiseReduction", &saOnOffInterpreter2}, - {0, AC_WRITE, 0, 0, 38, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction5}, - {0, AC_WRITE, 0, 0, 39, AUTO, "SmileShutterMode", &saSmileShutterMode}, - {0, AC_WRITE, 0, 0, 40, AUTO, "RedEyeReduction", &saOnOffInterpreter2}, - {0, AC_WRITE, 0, 0, 45, AUTO, "HDRSetting", &saOnOffInterpreter3}, - {0, AC_WRITE, 0, 0, 46, AUTO, "HDRLevel", &saHDRLevel}, - {0, AC_WRITE, 0, 0, 47, AUTO, "ViewingMode", &saViewingMode}, - {0, AC_WRITE, 0, 0, 48, AUTO, "FaceDetection", &saOnOffInterpreter2}, - {0, AC_WRITE, 0, 0, 49, AUTO, "SmileShutter", &saOnOffInterpreter2}, - {0, AC_WRITE, 0, 0, 50, AUTO, "SweepPanoramaSize", &saSweepPanoramaSize}, - {0, AC_WRITE, 0, 0, 51, AUTO, "SweepPanoramaDirection", &saSweepPanoramaDirection}, - {0, AC_WRITE, 0, 0, 52, AUTO, "DriveMode", &saDriveMode3}, - {0, AC_WRITE, 0, 0, 53, AUTO, "MultiFrameNoiseReduction", &saOnOffInterpreter4}, - {0, AC_WRITE, 0, 0, 54, AUTO, "LiveViewAFSetting", &saLiveViewAFSetting}, - {0, AC_WRITE, 0, 0, 56, AUTO, "PanoramaSize3D", &saPanoramaSize3D}, - {0, AC_WRITE, 0, 0, 131, AUTO, "AFButtonPressed", &saNoYesInterpreter}, - {0, AC_WRITE, 0, 0, 132, AUTO, "LiveViewMetering", &saLiveViewMetering}, - {0, AC_WRITE, 0, 0, 133, AUTO, "ViewingMode2", &saViewingMode}, - {0, AC_WRITE, 0, 0, 134, AUTO, "AELock", &saOnOffInterpreter5}, - {0, AC_WRITE, 0, 0, 135, AUTO, "FlashAction", &saFlashAction}, - {0, AC_WRITE, 0, 0, 139, AUTO, "LiveViewFocusMode", &saLiveViewFocusMode}, - {0, AC_WRITE, 0, 0, 153, AUTO, "LensMount", &saLensMount}, - {0, AC_WRITE, 0, 0, 643, AUTO, "AFButtonPressed", &saNoYesInterpreter}, - {0, AC_WRITE, 0, 0, 644, AUTO, "LiveViewMetering", &saLiveViewMetering}, - {0, AC_WRITE, 0, 0, 645, AUTO, "ViewingMode2", &saViewingMode}, - {0, AC_WRITE, 0, 0, 646, AUTO, "AELock", &saOnOffInterpreter5}, - {0, AC_WRITE, 0, 0, 647, AUTO, "FlashAction", &saFlashAction}, - {0, AC_WRITE, 0, 0, 651, AUTO, "LiveViewFocusMode", &saLiveViewFocusMode}, - {0, AC_WRITE, 0, 0, 1015, SHORT, "LensType2", &saLensID2Interpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_WRITE, 0, nullptr, 0, AUTO, "ShutterSpeedSetting", &saExposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 1, AUTO, "ApertureSetting", &saFNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "ISOSetting", &saISOSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "ExposureCompensationSet", &saExposureCompSetInterpreter}, + {0, AC_WRITE, 0, nullptr, 3, AUTO, "DriveModeSetting", &saDriveMode3}, + {0, AC_WRITE, 0, nullptr, 5, AUTO, "ExposureProgram", &saExposureProgram2}, + {0, AC_WRITE, 0, nullptr, 6, AUTO, "FocusModeSetting", &saFocusModeSetting3}, + {0, AC_WRITE, 0, nullptr, 7, AUTO, "MeteringMode", &saMeteringMode1_3}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "SonyImageSize", &saSonyImageSize3}, + {0, AC_WRITE, 0, nullptr, 10, AUTO, "AspectRatio", &saAspectRatio2}, + {0, AC_WRITE, 0, nullptr, 11, AUTO, "Quality", &saQualityInterpreter3}, + {0, AC_WRITE, 0, nullptr, 12, AUTO, "DynamicRangeOptimizerSetting", &saDynamicRangeOptimizerSetting}, + {0, AC_WRITE, 0, nullptr, 14, AUTO, "ColorSpace", &saColorSpace1_2}, + {0, AC_WRITE, 0, nullptr, 15, AUTO, "CreativeStyleSetting", &saCreativeStyleSetting}, + {0, AC_WRITE, 0, nullptr, 16, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 17, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 18, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 22, AUTO, "WhiteBalance", &saWhiteBalanceSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 23, AUTO, "ColorTemperatureSetting", &saColorTemperatureSettingInterpreter}, + {0, AC_WRITE, 0, nullptr, 23, AUTO, "ColorCompensationFilterSet", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 32, AUTO, "FlashMode", &saFlashMode2}, + {0, AC_WRITE, 0, nullptr, 33, AUTO, "FlashControl", &saFlashControl}, + {0, AC_WRITE, 0, nullptr, 35, AUTO, "FlashExposureCompSet", &saExposureCompSetInterpreter}, + {0, AC_WRITE, 0, nullptr, 36, AUTO, "AFAreaMode", &saAFAreaMode2}, + {0, AC_WRITE, 0, nullptr, 37, AUTO, "LongExposureNoiseReduction", &saOnOffInterpreter2}, + {0, AC_WRITE, 0, nullptr, 38, AUTO, "HighISONoiseReduction", &saHighISONoiseReduction5}, + {0, AC_WRITE, 0, nullptr, 39, AUTO, "SmileShutterMode", &saSmileShutterMode}, + {0, AC_WRITE, 0, nullptr, 40, AUTO, "RedEyeReduction", &saOnOffInterpreter2}, + {0, AC_WRITE, 0, nullptr, 45, AUTO, "HDRSetting", &saOnOffInterpreter3}, + {0, AC_WRITE, 0, nullptr, 46, AUTO, "HDRLevel", &saHDRLevel}, + {0, AC_WRITE, 0, nullptr, 47, AUTO, "ViewingMode", &saViewingMode}, + {0, AC_WRITE, 0, nullptr, 48, AUTO, "FaceDetection", &saOnOffInterpreter2}, + {0, AC_WRITE, 0, nullptr, 49, AUTO, "SmileShutter", &saOnOffInterpreter2}, + {0, AC_WRITE, 0, nullptr, 50, AUTO, "SweepPanoramaSize", &saSweepPanoramaSize}, + {0, AC_WRITE, 0, nullptr, 51, AUTO, "SweepPanoramaDirection", &saSweepPanoramaDirection}, + {0, AC_WRITE, 0, nullptr, 52, AUTO, "DriveMode", &saDriveMode3}, + {0, AC_WRITE, 0, nullptr, 53, AUTO, "MultiFrameNoiseReduction", &saOnOffInterpreter4}, + {0, AC_WRITE, 0, nullptr, 54, AUTO, "LiveViewAFSetting", &saLiveViewAFSetting}, + {0, AC_WRITE, 0, nullptr, 56, AUTO, "PanoramaSize3D", &saPanoramaSize3D}, + {0, AC_WRITE, 0, nullptr, 131, AUTO, "AFButtonPressed", &saNoYesInterpreter}, + {0, AC_WRITE, 0, nullptr, 132, AUTO, "LiveViewMetering", &saLiveViewMetering}, + {0, AC_WRITE, 0, nullptr, 133, AUTO, "ViewingMode2", &saViewingMode}, + {0, AC_WRITE, 0, nullptr, 134, AUTO, "AELock", &saOnOffInterpreter5}, + {0, AC_WRITE, 0, nullptr, 135, AUTO, "FlashAction", &saFlashAction}, + {0, AC_WRITE, 0, nullptr, 139, AUTO, "LiveViewFocusMode", &saLiveViewFocusMode}, + {0, AC_WRITE, 0, nullptr, 153, AUTO, "LensMount", &saLensMount}, + {0, AC_WRITE, 0, nullptr, 643, AUTO, "AFButtonPressed", &saNoYesInterpreter}, + {0, AC_WRITE, 0, nullptr, 644, AUTO, "LiveViewMetering", &saLiveViewMetering}, + {0, AC_WRITE, 0, nullptr, 645, AUTO, "ViewingMode2", &saViewingMode}, + {0, AC_WRITE, 0, nullptr, 646, AUTO, "AELock", &saOnOffInterpreter5}, + {0, AC_WRITE, 0, nullptr, 647, AUTO, "FlashAction", &saFlashAction}, + {0, AC_WRITE, 0, nullptr, 651, AUTO, "LiveViewFocusMode", &saLiveViewFocusMode}, + {0, AC_WRITE, 0, nullptr, 1015, SHORT, "LensType2", &saLensID2Interpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; /*const TagAttrib sonyDNGMakerNote[]={ diff --git a/rtexif/stdattribs.cc b/rtexif/stdattribs.cc index 98594e64c..2bd7a60f7 100644 --- a/rtexif/stdattribs.cc +++ b/rtexif/stdattribs.cc @@ -528,282 +528,282 @@ public: UTF8BinInterpreter utf8BinInterpreter; const TagAttrib exifAttribs[] = { - {0, AC_SYSTEM, 0, 0, 0x0100, AUTO, "ImageWidth", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0101, AUTO, "ImageHeight", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0102, AUTO, "BitsPerSample", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0103, AUTO, "Compression", &compressionInterpreter}, - {0, AC_WRITE, 0, 0, 0x828d, AUTO, "CFAPatternDim", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x828e, AUTO, "CFAPattern", &cfaInterpreter}, - {0, AC_WRITE, 0, 0, 0x829A, AUTO, "ExposureTime", &exposureTimeInterpreter}, - {0, AC_WRITE, 0, 0, 0x829D, AUTO, "FNumber", &fNumberInterpreter}, - {0, AC_WRITE, 0, 0, 0x8822, AUTO, "ExposureProgram", &exposureProgramInterpreter}, - {0, AC_WRITE, 0, 0, 0x8824, AUTO, "SpectralSensitivity", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x8827, AUTO, "ISOSpeedRatings", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x8828, AUTO, "OECF", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x8832, AUTO, "RecommendedExposureIndex", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9000, AUTO, "ExifVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9003, AUTO, "DateTimeOriginal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9004, AUTO, "DateTimeDigitized", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x9101, AUTO, "ComponentsConfiguration", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x9102, AUTO, "CompressedBitsPerPixel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9201, AUTO, "ShutterSpeedValue", &shutterSpeedInterpreter}, - {0, AC_WRITE, 0, 0, 0x9202, AUTO, "ApertureValue", &apertureInterpreter}, - {0, AC_WRITE, 0, 0, 0x9203, AUTO, "BrightnessValue", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9204, AUTO, "ExposureBiasValue", &exposureBiasInterpreter}, - {0, AC_WRITE, 0, 0, 0x9205, AUTO, "MaxApertureValue", &apertureInterpreter}, - {0, AC_WRITE, 0, 0, 0x9206, AUTO, "SubjectDistance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9207, AUTO, "MeteringMode", &meteringModeInterpreter}, - {0, AC_WRITE, 0, 0, 0x9208, AUTO, "LightSource", &lightSourceInterpreter}, - {0, AC_WRITE, 0, 0, 0x9209, AUTO, "Flash", &flashInterpreter}, - {0, AC_WRITE, 0, 0, 0x920A, AUTO, "FocalLength", &focalLengthInterpreter}, - {0, AC_WRITE, 0, 0, 0x9214, AUTO, "SubjectArea", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9215, AUTO, "ExposureIndex", &stdInterpreter}, // Note: exists as 0xA215 too, it should be that way - {0, AC_DONTWRITE, 0, 0, 0x9216, AUTO, "TIFFEPSStandardID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9217, AUTO, "SensingMethod", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x927C, AUTO, "MakerNote", &stdInterpreter}, - {0, AC_WRITE, 1, 0, 0x9286, AUTO, "UserComment", &userCommentInterpreter}, - {0, AC_WRITE, 0, 0, 0x9290, AUTO, "SubSecTime", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9291, AUTO, "SubSecTimeOriginal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9292, AUTO, "SubSecTimeDigitized", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0xA000, AUTO, "FlashpixVersion", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xA001, AUTO, "ColorSpace", &colorSpaceInterpreter}, - {0, AC_SYSTEM, 0, 0, 0xA002, AUTO, "PixelXDimension", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0xA003, AUTO, "PixelYDimension", &stdInterpreter}, - {1, AC_DONTWRITE, 0, 0, 0xA004, AUTO, "RelatedSoundFile", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0100, AUTO, "ImageWidth", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0101, AUTO, "ImageHeight", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0102, AUTO, "BitsPerSample", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0103, AUTO, "Compression", &compressionInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x828d, AUTO, "CFAPatternDim", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x828e, AUTO, "CFAPattern", &cfaInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x829A, AUTO, "ExposureTime", &exposureTimeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x829D, AUTO, "FNumber", &fNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8822, AUTO, "ExposureProgram", &exposureProgramInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8824, AUTO, "SpectralSensitivity", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8827, AUTO, "ISOSpeedRatings", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8828, AUTO, "OECF", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8832, AUTO, "RecommendedExposureIndex", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9000, AUTO, "ExifVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9003, AUTO, "DateTimeOriginal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9004, AUTO, "DateTimeDigitized", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x9101, AUTO, "ComponentsConfiguration", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x9102, AUTO, "CompressedBitsPerPixel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9201, AUTO, "ShutterSpeedValue", &shutterSpeedInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9202, AUTO, "ApertureValue", &apertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9203, AUTO, "BrightnessValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9204, AUTO, "ExposureBiasValue", &exposureBiasInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9205, AUTO, "MaxApertureValue", &apertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9206, AUTO, "SubjectDistance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9207, AUTO, "MeteringMode", &meteringModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9208, AUTO, "LightSource", &lightSourceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9209, AUTO, "Flash", &flashInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x920A, AUTO, "FocalLength", &focalLengthInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9214, AUTO, "SubjectArea", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9215, AUTO, "ExposureIndex", &stdInterpreter}, // Note: exists as 0xA215 too, it should be that way + {0, AC_DONTWRITE, 0, nullptr, 0x9216, AUTO, "TIFFEPSStandardID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9217, AUTO, "SensingMethod", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x927C, AUTO, "MakerNote", &stdInterpreter}, + {0, AC_WRITE, 1, nullptr, 0x9286, AUTO, "UserComment", &userCommentInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9290, AUTO, "SubSecTime", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9291, AUTO, "SubSecTimeOriginal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9292, AUTO, "SubSecTimeDigitized", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0xA000, AUTO, "FlashpixVersion", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0xA001, AUTO, "ColorSpace", &colorSpaceInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0xA002, AUTO, "PixelXDimension", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0xA003, AUTO, "PixelYDimension", &stdInterpreter}, + {1, AC_DONTWRITE, 0, nullptr, 0xA004, AUTO, "RelatedSoundFile", &stdInterpreter}, {0, AC_SYSTEM, 0, iopAttribs, 0xA005, AUTO, "Interoperability", &stdInterpreter}, // do not enable, as it causes trouble with FUJI files - {0, AC_WRITE, 0, 0, 0xA20B, AUTO, "FlashEnergy", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA20C, AUTO, "SpatialFrequencyResponse", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA20E, AUTO, "FocalPlaneXResolution", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA20F, AUTO, "FocalPlaneYResolution", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA210, AUTO, "FocalPlaneResolutionUnit", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA214, AUTO, "SubjectLocation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA215, AUTO, "ExposureIndex", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA217, AUTO, "SensingMethod", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA300, AUTO, "FileSource", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA301, AUTO, "SceneType", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xA302, AUTO, "CFAPattern", &cfaInterpreter}, - {0, AC_WRITE, 0, 0, 0xA401, AUTO, "CustomRendered", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA402, AUTO, "ExposureMode", &exposureModeInterpreter}, - {0, AC_WRITE, 0, 0, 0xA403, AUTO, "WhiteBalance", &whiteBalanceInterpreter}, - {0, AC_WRITE, 0, 0, 0xA404, AUTO, "DigitalZoomRatio", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA405, AUTO, "FocalLengthIn35mmFilm", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA406, AUTO, "SceneCaptureType", &sceneCaptureInterpreter}, - {0, AC_WRITE, 0, 0, 0xA407, AUTO, "GainControl", &gainControlInterpreter}, - {0, AC_WRITE, 0, 0, 0xA408, AUTO, "Contrast", &contrastInterpreter}, - {0, AC_WRITE, 0, 0, 0xA409, AUTO, "Saturation", &saturationInterpreter}, - {0, AC_WRITE, 0, 0, 0xA40A, AUTO, "Sharpness", &sharpnessInterpreter}, - {0, AC_WRITE, 0, 0, 0xA40B, AUTO, "DeviceSettingDescription", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA40C, AUTO, "SubjectDistanceRange", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA420, AUTO, "ImageUniqueID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA431, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA432, AUTO, "LensInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA433, AUTO, "LensMake", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA434, AUTO, "LensModel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA435, AUTO, "LensSerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xA500, AUTO, "Gamma", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC618, AUTO, "LinearizationTable", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC619, AUTO, "BlackLevelRepeatDim", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC61A, AUTO, "BlackLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC61B, AUTO, "BlackLevelDeltaH", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC61C, AUTO, "BlackLevelDeltaV", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC61D, AUTO, "WhiteLevel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC61E, AUTO, "DefaultScale", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC61F, AUTO, "DefaultCropOrigin", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC620, AUTO, "DefaultCropSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC621, AUTO, "ColorMatrix1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC622, AUTO, "ColorMatrix2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC623, AUTO, "CameraCalibration1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC624, AUTO, "CameraCalibration2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC625, AUTO, "ReductionMatrix1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC626, AUTO, "ReductionMatrix2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC627, AUTO, "AnalogBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC628, AUTO, "AsShotNeutral", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC629, AUTO, "AsShotWhiteXY", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC62A, AUTO, "BaselineExposure", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC62B, AUTO, "BaselineNoise", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC62C, AUTO, "BaselineSharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC62D, AUTO, "BayerGreenSplit", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC62E, AUTO, "LinearResponseLimit", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC62F, AUTO, "CameraSerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC630, AUTO, "DNGLensInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC631, AUTO, "ChromaBlurRadius", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC632, AUTO, "AntiAliasStrength", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC633, AUTO, "ShadowScale", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC65A, AUTO, "CalibrationIlluminant1", &lightSourceInterpreter}, - {0, AC_WRITE, 0, 0, 0xC65B, AUTO, "CalibrationIlluminant2", &lightSourceInterpreter}, - {0, AC_WRITE, 0, 0, 0xC65C, AUTO, "BestQualityScale", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC65D, AUTO, "RawDataUniqueID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC68B, AUTO, "OriginalRawFileName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC68D, AUTO, "ActiveArea", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC68E, AUTO, "MaskedAreas", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA20B, AUTO, "FlashEnergy", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA20C, AUTO, "SpatialFrequencyResponse", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA20E, AUTO, "FocalPlaneXResolution", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA20F, AUTO, "FocalPlaneYResolution", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA210, AUTO, "FocalPlaneResolutionUnit", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA214, AUTO, "SubjectLocation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA215, AUTO, "ExposureIndex", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA217, AUTO, "SensingMethod", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA300, AUTO, "FileSource", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA301, AUTO, "SceneType", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0xA302, AUTO, "CFAPattern", &cfaInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA401, AUTO, "CustomRendered", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA402, AUTO, "ExposureMode", &exposureModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA403, AUTO, "WhiteBalance", &whiteBalanceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA404, AUTO, "DigitalZoomRatio", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA405, AUTO, "FocalLengthIn35mmFilm", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA406, AUTO, "SceneCaptureType", &sceneCaptureInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA407, AUTO, "GainControl", &gainControlInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA408, AUTO, "Contrast", &contrastInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA409, AUTO, "Saturation", &saturationInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA40A, AUTO, "Sharpness", &sharpnessInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA40B, AUTO, "DeviceSettingDescription", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA40C, AUTO, "SubjectDistanceRange", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA420, AUTO, "ImageUniqueID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA431, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA432, AUTO, "LensInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA433, AUTO, "LensMake", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA434, AUTO, "LensModel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA435, AUTO, "LensSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xA500, AUTO, "Gamma", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC618, AUTO, "LinearizationTable", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC619, AUTO, "BlackLevelRepeatDim", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC61A, AUTO, "BlackLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC61B, AUTO, "BlackLevelDeltaH", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC61C, AUTO, "BlackLevelDeltaV", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC61D, AUTO, "WhiteLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC61E, AUTO, "DefaultScale", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC61F, AUTO, "DefaultCropOrigin", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC620, AUTO, "DefaultCropSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC621, AUTO, "ColorMatrix1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC622, AUTO, "ColorMatrix2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC623, AUTO, "CameraCalibration1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC624, AUTO, "CameraCalibration2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC625, AUTO, "ReductionMatrix1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC626, AUTO, "ReductionMatrix2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC627, AUTO, "AnalogBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC628, AUTO, "AsShotNeutral", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC629, AUTO, "AsShotWhiteXY", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC62A, AUTO, "BaselineExposure", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC62B, AUTO, "BaselineNoise", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC62C, AUTO, "BaselineSharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC62D, AUTO, "BayerGreenSplit", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC62E, AUTO, "LinearResponseLimit", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC62F, AUTO, "CameraSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC630, AUTO, "DNGLensInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC631, AUTO, "ChromaBlurRadius", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC632, AUTO, "AntiAliasStrength", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC633, AUTO, "ShadowScale", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC65A, AUTO, "CalibrationIlluminant1", &lightSourceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC65B, AUTO, "CalibrationIlluminant2", &lightSourceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC65C, AUTO, "BestQualityScale", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC65D, AUTO, "RawDataUniqueID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC68B, AUTO, "OriginalRawFileName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC68D, AUTO, "ActiveArea", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC68E, AUTO, "MaskedAreas", &stdInterpreter}, // {0, AC_WRITE, 0, 0, 0xC68F, AUTO, "AsShotICCProfile", & ???}, - {0, AC_WRITE, 0, 0, 0xC690, AUTO, "AsShotPreProfileMatrix", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC690, AUTO, "AsShotPreProfileMatrix", &stdInterpreter}, // {0, AC_WRITE, 0, 0, 0xC691, AUTO, "CurrentICCProfile", & ???}, - {0, AC_WRITE, 0, 0, 0xC692, AUTO, "CurrentPreProfileMatrix", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6BF, AUTO, "ColorimetricReference", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F3, AUTO, "CameraCalibrationSig", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F4, AUTO, "ProfileCalibrationSig", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F5, AUTO, "ProfileIFD", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F6, AUTO, "AsShotProfileName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F7, AUTO, "NoiseReductionApplied", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F8, AUTO, "ProfileName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6F9, AUTO, "ProfileHueSatMapDims", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6FA, AUTO, "ProfileHueSatMapData1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6FB, AUTO, "ProfileHueSatMapData2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6FC, AUTO, "ProfileToneCurve", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6FD, AUTO, "ProfileEmbedPolicy", &profileEmbedPolicyInterpreter}, - {0, AC_WRITE, 0, 0, 0xC6FE, AUTO, "ProfileCopyright", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC714, AUTO, "ForwardMatrix1", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC715, AUTO, "ForwardMatrix2", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC716, AUTO, "PreviewApplicationName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC717, AUTO, "PreviewApplicationVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC718, AUTO, "PreviewSettingsName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC719, AUTO, "PreviewSettingsDigest", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC71A, AUTO, "PreviewColorSpace", &previewColorSpaceInterpreter}, - {0, AC_WRITE, 0, 0, 0xC71B, AUTO, "PreviewDateTime", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC71C, AUTO, "RawImageDigest", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC71D, AUTO, "OriginalRawFileDigest", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC692, AUTO, "CurrentPreProfileMatrix", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6BF, AUTO, "ColorimetricReference", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F3, AUTO, "CameraCalibrationSig", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F4, AUTO, "ProfileCalibrationSig", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F5, AUTO, "ProfileIFD", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F6, AUTO, "AsShotProfileName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F7, AUTO, "NoiseReductionApplied", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F8, AUTO, "ProfileName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6F9, AUTO, "ProfileHueSatMapDims", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6FA, AUTO, "ProfileHueSatMapData1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6FB, AUTO, "ProfileHueSatMapData2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6FC, AUTO, "ProfileToneCurve", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6FD, AUTO, "ProfileEmbedPolicy", &profileEmbedPolicyInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC6FE, AUTO, "ProfileCopyright", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC714, AUTO, "ForwardMatrix1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC715, AUTO, "ForwardMatrix2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC716, AUTO, "PreviewApplicationName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC717, AUTO, "PreviewApplicationVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC718, AUTO, "PreviewSettingsName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC719, AUTO, "PreviewSettingsDigest", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC71A, AUTO, "PreviewColorSpace", &previewColorSpaceInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC71B, AUTO, "PreviewDateTime", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC71C, AUTO, "RawImageDigest", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC71D, AUTO, "OriginalRawFileDigest", &stdInterpreter}, // {0, AC_WRITE, 0, 0, 0xC71E, AUTO, "SubTileBlockSize", & ???}, // {0, AC_WRITE, 0, 0, 0xC71F, AUTO, "RowInterleaveFactor", & ???}, - {0, AC_WRITE, 0, 0, 0xC725, AUTO, "ProfileLookTableDims", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC726, AUTO, "ProfileLookTableData", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC725, AUTO, "ProfileLookTableDims", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC726, AUTO, "ProfileLookTableData", &stdInterpreter}, // {0, AC_WRITE, 0, 0, 0xC740, AUTO, "OpcodeList1", & ???}, // {0, AC_WRITE, 0, 0, 0xC741, AUTO, "OpcodeList2", & ???}, // {0, AC_WRITE, 0, 0, 0xC74E, AUTO, "OpcodeList3", & ???}, - {0, AC_WRITE, 0, 0, 0xC761, AUTO, "NoiseProfile", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC763, AUTO, "TimeCodes", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC764, AUTO, "FrameRate", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC772, AUTO, "TStop", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC789, AUTO, "ReelName", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC791, AUTO, "OriginalDefaultFinalSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC792, AUTO, "OriginalBestQualitySize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC793, AUTO, "OriginalDefaultCropSize", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A1, AUTO, "CameraLabel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A3, AUTO, "ProfileHueSatMapEncoding", &linearSRGBInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A4, AUTO, "ProfileLookTableEncoding", &linearSRGBInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A5, AUTO, "BaselineExposureOffset", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A6, AUTO, "DefaultBlackRender", &defaultBlackRenderInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A7, AUTO, "NewRawImageDigest", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7A8, AUTO, "RawToPreviewGain", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC7B5, AUTO, "DefaultUserCrop", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFDE9, AUTO, "SerialNumber", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFDEA, AUTO, "Lens", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE4C, AUTO, "RawFile", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE4D, AUTO, "Converter", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE4E, AUTO, "WhiteBalance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE51, AUTO, "Exposure", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE52, AUTO, "Shadows", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE53, AUTO, "Brightness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE54, AUTO, "Contrast", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE55, AUTO, "Saturation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE56, AUTO, "Sharpness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE57, AUTO, "Smoothness", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xFE58, AUTO, "MoireFilter", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL } + {0, AC_WRITE, 0, nullptr, 0xC761, AUTO, "NoiseProfile", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC763, AUTO, "TimeCodes", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC764, AUTO, "FrameRate", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC772, AUTO, "TStop", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC789, AUTO, "ReelName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC791, AUTO, "OriginalDefaultFinalSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC792, AUTO, "OriginalBestQualitySize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC793, AUTO, "OriginalDefaultCropSize", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A1, AUTO, "CameraLabel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A3, AUTO, "ProfileHueSatMapEncoding", &linearSRGBInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A4, AUTO, "ProfileLookTableEncoding", &linearSRGBInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A5, AUTO, "BaselineExposureOffset", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A6, AUTO, "DefaultBlackRender", &defaultBlackRenderInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A7, AUTO, "NewRawImageDigest", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7A8, AUTO, "RawToPreviewGain", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC7B5, AUTO, "DefaultUserCrop", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFDE9, AUTO, "SerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFDEA, AUTO, "Lens", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE4C, AUTO, "RawFile", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE4D, AUTO, "Converter", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE4E, AUTO, "WhiteBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE51, AUTO, "Exposure", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE52, AUTO, "Shadows", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE53, AUTO, "Brightness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE54, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE55, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE56, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE57, AUTO, "Smoothness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xFE58, AUTO, "MoireFilter", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr } }; const TagAttrib gpsAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0000, AUTO, "GPSVersionID", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0001, AUTO, "GPSLatitudeRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0002, AUTO, "GPSLatitude", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0003, AUTO, "GPSLongitudeRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0004, AUTO, "GPSLongitude", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0005, AUTO, "GPSAltitudeRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0006, AUTO, "GPSAltitude", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0007, AUTO, "GPSTimeStamp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0008, AUTO, "GPSSatelites", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0009, AUTO, "GPSStatus", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000a, AUTO, "GPSMeasureMode", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000b, AUTO, "GPSDOP", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000c, AUTO, "GPSSpeedRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000d, AUTO, "GPSSpeed", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000e, AUTO, "GPSTrackRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x000f, AUTO, "GPSTrack", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0010, AUTO, "GPSImgDirectionRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0011, AUTO, "GPSImgDirection", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0012, AUTO, "GPSMapDatum", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0013, AUTO, "GPSDestLatitudeRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0014, AUTO, "GPSDestLatitude", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0015, AUTO, "GPSDestLongitudeRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0016, AUTO, "GPSDestLongitude", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0017, AUTO, "GPSDestBearingRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0018, AUTO, "GPSDestBearing", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0019, AUTO, "GPSDestDistanceRef", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001a, AUTO, "GPSDestDistance", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001b, AUTO, "GPSProcessingMethod", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001c, AUTO, "GPSAreaInformation", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001d, AUTO, "GPSDateStamp", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x001e, AUTO, "GPSDifferential", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL } + {0, AC_WRITE, 0, nullptr, 0x0000, AUTO, "GPSVersionID", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "GPSLatitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0002, AUTO, "GPSLatitude", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "GPSLongitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0004, AUTO, "GPSLongitude", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0005, AUTO, "GPSAltitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0006, AUTO, "GPSAltitude", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0007, AUTO, "GPSTimeStamp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0008, AUTO, "GPSSatelites", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0009, AUTO, "GPSStatus", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000a, AUTO, "GPSMeasureMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000b, AUTO, "GPSDOP", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000c, AUTO, "GPSSpeedRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000d, AUTO, "GPSSpeed", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000e, AUTO, "GPSTrackRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000f, AUTO, "GPSTrack", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0010, AUTO, "GPSImgDirectionRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0011, AUTO, "GPSImgDirection", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0012, AUTO, "GPSMapDatum", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0013, AUTO, "GPSDestLatitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0014, AUTO, "GPSDestLatitude", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0015, AUTO, "GPSDestLongitudeRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0016, AUTO, "GPSDestLongitude", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0017, AUTO, "GPSDestBearingRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0018, AUTO, "GPSDestBearing", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0019, AUTO, "GPSDestDistanceRef", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001a, AUTO, "GPSDestDistance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001b, AUTO, "GPSProcessingMethod", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001c, AUTO, "GPSAreaInformation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001d, AUTO, "GPSDateStamp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001e, AUTO, "GPSDifferential", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr } }; const TagAttrib iopAttribs[] = { - {0, AC_WRITE, 0, 0, 0x0001, AUTO, "InteroperabilityIndex", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0002, AUTO, "InteroperabilityVersion", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL } + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "InteroperabilityIndex", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0002, AUTO, "InteroperabilityVersion", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr } }; const TagAttrib ifdAttribs[] = { - {0, AC_SYSTEM, 0, 0, 0x0017, AUTO, "PanaISO", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0100, AUTO, "ImageWidth", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0101, AUTO, "ImageHeight", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0102, AUTO, "BitsPerSample", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0103, AUTO, "Compression", &compressionInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0106, AUTO, "PhotometricInterpretation", &photometricInterpreter}, - {0, AC_WRITE, 1, 0, 0x010E, AUTO, "ImageDescription", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x010F, AUTO, "Make", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0110, AUTO, "Model", &stdInterpreter}, - {1, AC_DONTWRITE, 0, 0, 0x0111, AUTO, "StripOffsets", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0112, AUTO, "Orientation", &orientationInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0115, AUTO, "SamplesPerPixel", &stdInterpreter}, - {1, AC_DONTWRITE, 0, 0, 0x0116, AUTO, "RowsPerStrip", &stdInterpreter}, - {1, AC_DONTWRITE, 0, 0, 0x0117, AUTO, "StripByteCounts", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x011A, AUTO, "XResolution", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x011B, AUTO, "YResolution", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x011C, AUTO, "PlanarConfiguration", &planarConfigInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0128, AUTO, "ResolutionUnit", &unitsInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x012D, AUTO, "TransferFunction", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0131, AUTO, "Software", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x0132, AUTO, "DateTime", &stdInterpreter}, - {0, AC_WRITE, 1, 0, 0x013B, AUTO, "Artist", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x013E, AUTO, "WhitePoint", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x013F, AUTO, "PriomaryChromaticities", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0017, AUTO, "PanaISO", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0100, AUTO, "ImageWidth", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0101, AUTO, "ImageHeight", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0102, AUTO, "BitsPerSample", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0103, AUTO, "Compression", &compressionInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0106, AUTO, "PhotometricInterpretation", &photometricInterpreter}, + {0, AC_WRITE, 1, nullptr, 0x010E, AUTO, "ImageDescription", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010F, AUTO, "Make", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0110, AUTO, "Model", &stdInterpreter}, + {1, AC_DONTWRITE, 0, nullptr, 0x0111, AUTO, "StripOffsets", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0112, AUTO, "Orientation", &orientationInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0115, AUTO, "SamplesPerPixel", &stdInterpreter}, + {1, AC_DONTWRITE, 0, nullptr, 0x0116, AUTO, "RowsPerStrip", &stdInterpreter}, + {1, AC_DONTWRITE, 0, nullptr, 0x0117, AUTO, "StripByteCounts", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x011A, AUTO, "XResolution", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x011B, AUTO, "YResolution", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x011C, AUTO, "PlanarConfiguration", &planarConfigInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0128, AUTO, "ResolutionUnit", &unitsInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x012D, AUTO, "TransferFunction", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0131, AUTO, "Software", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0132, AUTO, "DateTime", &stdInterpreter}, + {0, AC_WRITE, 1, nullptr, 0x013B, AUTO, "Artist", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x013E, AUTO, "WhitePoint", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x013F, AUTO, "PriomaryChromaticities", &stdInterpreter}, {0, AC_WRITE, 0, ifdAttribs, 0x014A, AUTO, "SubIFD", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0201, AUTO, "JPEGInterchangeFormat", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0202, AUTO, "JPEGInterchangeFormatLength", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0211, AUTO, "YCbCrCoefficients", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0212, AUTO, "YCbCrSubSampling", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0213, AUTO, "YCbCrPositioning", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x0214, AUTO, "ReferenceBlackWhite", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x02bc, AUTO, "ApplicationNotes", &utf8BinInterpreter}, // XMP - {0, AC_WRITE, 0, 0, 0x4746, AUTO, "Rating", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x4749, AUTO, "RatingPercent", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x828d, AUTO, "CFAPatternDim", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x828e, AUTO, "CFAPattern", &cfaInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0201, AUTO, "JPEGInterchangeFormat", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0202, AUTO, "JPEGInterchangeFormatLength", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0211, AUTO, "YCbCrCoefficients", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0212, AUTO, "YCbCrSubSampling", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0213, AUTO, "YCbCrPositioning", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x0214, AUTO, "ReferenceBlackWhite", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x02bc, AUTO, "ApplicationNotes", &utf8BinInterpreter}, // XMP + {0, AC_WRITE, 0, nullptr, 0x4746, AUTO, "Rating", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x4749, AUTO, "RatingPercent", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x828d, AUTO, "CFAPatternDim", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x828e, AUTO, "CFAPattern", &cfaInterpreter}, {0, AC_WRITE, 0, kodakIfdAttribs, 0x8290, AUTO, "KodakIFD", &stdInterpreter}, - {0, AC_WRITE, 1, 0, 0x8298, AUTO, "Copyright", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0x8606, AUTO, "LeafData", &stdInterpreter}, // is actually a subdir, but a proprietary format + {0, AC_WRITE, 1, nullptr, 0x8298, AUTO, "Copyright", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0x8606, AUTO, "LeafData", &stdInterpreter}, // is actually a subdir, but a proprietary format {0, AC_WRITE, 0, exifAttribs, 0x8769, AUTO, "Exif", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x8773, AUTO, "ICCProfile", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x83BB, AUTO, "IPTCData", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x8773, AUTO, "ICCProfile", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x83BB, AUTO, "IPTCData", &stdInterpreter}, {0, AC_WRITE, 0, gpsAttribs, 0x8825, AUTO, "GPSInfo", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9003, AUTO, "DateTimeOriginal", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9004, AUTO, "DateTimeDigitized", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0x9211, AUTO, "ImageNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9003, AUTO, "DateTimeOriginal", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9004, AUTO, "DateTimeDigitized", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x9211, AUTO, "ImageNumber", &stdInterpreter}, {0, AC_WRITE, 0, iopAttribs, 0xA005, AUTO, "Interoperability", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xC4A5, AUTO, "PrintIMInformation", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xC612, AUTO, "DNGVersion", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xC613, AUTO, "DNGBackwardVersion", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC614, AUTO, "UniqueCameraModel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xC615, AUTO, "LocalizedCameraModel", &stdInterpreter}, - {0, AC_WRITE, 0, 0, 0xc62f, AUTO, "CameraSerialNumber", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0xc630, AUTO, "DNGLensInfo", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xC634, AUTO, "MakerNote", &stdInterpreter}, //DNGPrivateData - {0, AC_WRITE, 0, 0, 0xc65d, AUTO, "RawDataUniqueID", &stdInterpreter}, - {0, AC_DONTWRITE, 0, 0, 0xc761, AUTO, "NoiseProfile", &stdInterpreter}, - {0, AC_SYSTEM, 0, 0, 0x00fe, AUTO, "NewSubFileType", &stdInterpreter}, - { -1, AC_DONTWRITE, 0, 0, 0, AUTO, "", NULL} + {0, AC_DONTWRITE, 0, nullptr, 0xC4A5, AUTO, "PrintIMInformation", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0xC612, AUTO, "DNGVersion", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0xC613, AUTO, "DNGBackwardVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC614, AUTO, "UniqueCameraModel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xC615, AUTO, "LocalizedCameraModel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0xc62f, AUTO, "CameraSerialNumber", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0xc630, AUTO, "DNGLensInfo", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0xC634, AUTO, "MakerNote", &stdInterpreter}, //DNGPrivateData + {0, AC_WRITE, 0, nullptr, 0xc65d, AUTO, "RawDataUniqueID", &stdInterpreter}, + {0, AC_DONTWRITE, 0, nullptr, 0xc761, AUTO, "NoiseProfile", &stdInterpreter}, + {0, AC_SYSTEM, 0, nullptr, 0x00fe, AUTO, "NewSubFileType", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr} }; } diff --git a/rtgui/CMakeLists.txt b/rtgui/CMakeLists.txt index b3094091d..81118b9eb 100644 --- a/rtgui/CMakeLists.txt +++ b/rtgui/CMakeLists.txt @@ -8,7 +8,7 @@ set (BASESOURCEFILES coarsepanel.cc cacorrection.cc chmixer.cc blackwhite.cc resize.cc icmpanel.cc crop.cc shadowshighlights.cc spot.cc impulsedenoise.cc dirpyrdenoise.cc epd.cc - exifpanel.cc toolpanel.cc lensprofile.cc + exifpanel.cc toolpanel.cc lensprofile.cc lockablecolorpicker.cc sharpening.cc vibrance.cc rgbcurves.cc colortoning.cc whitebalance.cc vignetting.cc gradient.cc pcvignette.cc rotate.cc distortion.cc crophandler.cc dirbrowser.cc diff --git a/rtgui/adjuster.cc b/rtgui/adjuster.cc index f0e53fbbf..aba977d0d 100644 --- a/rtgui/adjuster.cc +++ b/rtgui/adjuster.cc @@ -35,12 +35,11 @@ static double one2one(double val) Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep, double vdefault, Gtk::Image *imgIcon1, Gtk::Image *imgIcon2, double2double_fun slider2value_, double2double_fun value2slider_) { - Gtk::HBox *hbox2 = NULL; - label = NULL; - adjusterListener = NULL; + label = nullptr; + adjusterListener = nullptr; afterReset = false; blocked = false; - automatic = NULL; + automatic = nullptr; eventPending = false; slider2value = slider2value_ ? slider2value_ : one2one; @@ -59,7 +58,7 @@ Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep hbox->set_border_width(0); hbox->set_spacing(2); - editedCheckBox = NULL; + editedCheckBox = nullptr; if (!vlabel.empty()) { adjustmentName = vlabel; @@ -107,6 +106,8 @@ Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep if (!imgIcon1 || !imgIcon2) { pack_start (*slider, true, true); } else { + Gtk::HBox *hbox2 = nullptr; + // A second HBox is necessary hbox2 = Gtk::manage (new Gtk::HBox()); @@ -145,7 +146,7 @@ Adjuster::~Adjuster () sliderChange.block (true); spinChange.block (true); delayConnection.block (true); - adjusterListener = NULL; + adjusterListener = nullptr; if (automatic) { delete automatic; @@ -171,7 +172,7 @@ void Adjuster::delAutoButton () if (automatic) { removeIfThere(hbox, automatic); delete automatic; - automatic = NULL; + automatic = nullptr; } } @@ -227,7 +228,7 @@ void Adjuster::autoToggled () } } - if (adjusterListener != NULL && !blocked) { + if (adjusterListener != nullptr && !blocked) { adjusterListener->adjusterAutoToggled(this, automatic->get_active()); } } @@ -235,7 +236,7 @@ void Adjuster::autoToggled () void Adjuster::sliderReleased (GdkEventButton* event) { - if ((event != NULL) && (event->button == 1)) { + if ((event != nullptr) && (event->button == 1)) { if (delayConnection.connected()) { delayConnection.disconnect (); } @@ -247,7 +248,7 @@ void Adjuster::sliderReleased (GdkEventButton* event) void Adjuster::spinReleased (GdkEventButton* event) { - if ((event != NULL) && delay == 0) { + if ((event != nullptr) && delay == 0) { if (delayConnection.connected()) { delayConnection.disconnect (); } @@ -289,7 +290,7 @@ void Adjuster::resetValue (bool toInitial) void Adjuster::resetPressed (GdkEventButton* event) { - if ((event != NULL) && (event->state & GDK_CONTROL_MASK) && (event->button == 1)) { + if ((event != nullptr) && (event->state & GDK_CONTROL_MASK) && (event->button == 1)) { resetValue(true); } else { resetValue(false); @@ -463,7 +464,7 @@ void Adjuster::setAutoValue (bool a) bool Adjuster::notifyListener () { - if (eventPending && adjusterListener != NULL && !blocked) { + if (eventPending && adjusterListener != nullptr && !blocked) { adjusterListener->adjusterChanged (this, spin->get_value ()); } @@ -475,7 +476,7 @@ bool Adjuster::notifyListener () bool Adjuster::notifyListenerAutoToggled () { - if (adjusterListener != NULL && !blocked) { + if (adjusterListener != nullptr && !blocked) { adjusterListener->adjusterAutoToggled(this, automatic->get_active()); } diff --git a/rtgui/adjuster.h b/rtgui/adjuster.h index 4b9ad36a4..782139f05 100644 --- a/rtgui/adjuster.h +++ b/rtgui/adjuster.h @@ -79,7 +79,7 @@ public: int delay; - Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep, double vdefault, Gtk::Image *imgIcon1 = NULL, Gtk::Image *imgIcon2 = NULL, double2double_fun slider2value = NULL, double2double_fun value2slider = NULL); + Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep, double vdefault, Gtk::Image *imgIcon1 = nullptr, Gtk::Image *imgIcon2 = nullptr, double2double_fun slider2value = nullptr, double2double_fun value2slider = nullptr); virtual ~Adjuster (); // Add an "Automatic" checkbox next to the reset button. @@ -89,7 +89,7 @@ public: // Send back the value of og the Auto checkbox bool getAutoValue () { - return automatic != NULL ? automatic->get_active () : false; + return automatic != nullptr ? automatic->get_active () : false; } void setAutoValue (bool a); bool notifyListenerAutoToggled (); diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc index 333ad8d4f..b4a2ad37f 100644 --- a/rtgui/batchqueue.cc +++ b/rtgui/batchqueue.cc @@ -38,7 +38,7 @@ using namespace std; using namespace rtengine; -BatchQueue::BatchQueue (FileCatalog* aFileCatalog) : processing(NULL), fileCatalog(aFileCatalog), sequence(0), listener(NULL) +BatchQueue::BatchQueue (FileCatalog* aFileCatalog) : processing(nullptr), fileCatalog(aFileCatalog), sequence(0), listener(nullptr) { location = THLOC_BATCHQUEUE; @@ -368,7 +368,7 @@ bool BatchQueue::loadBatchQueue () Glib::ustring BatchQueue::getTempFilenameForParams( const Glib::ustring &filename ) { timeval tv; - gettimeofday(&tv, 0); + gettimeofday(&tv, nullptr); char mseconds[4]; sprintf(mseconds, "%d", (int)(tv.tv_usec / 1000)); time_t rawtime; @@ -501,7 +501,7 @@ void BatchQueue::selectAll () { MYWRITERLOCK(l, entryRW); - lastClicked = NULL; + lastClicked = nullptr; selected.clear (); for (size_t i = 0; i < fd.size(); i++) { @@ -642,7 +642,7 @@ rtengine::ProcessingJob* BatchQueue::imageReady (rtengine::IImage16* img) MYWRITERLOCK(l, entryRW); delete processing; - processing = NULL; + processing = nullptr; fd.erase (fd.begin()); @@ -709,7 +709,7 @@ rtengine::ProcessingJob* BatchQueue::imageReady (rtengine::IImage16* img) redraw (); notifyListener (queueEmptied); - return processing ? processing->job : NULL; + return processing ? processing->job : nullptr; } // Calculates automatic filename of processed batch entry, but just the base name @@ -962,7 +962,7 @@ void BatchQueue::error (Glib::ustring msg) processing->addButtonSet (bqbs); processing->processing = false; processing->job = rtengine::ProcessingJob::create(processing->filename, processing->thumbnail->getType() == FT_Raw, processing->params); - processing = NULL; + processing = nullptr; redraw (); } diff --git a/rtgui/batchqueue.h b/rtgui/batchqueue.h index 3bf3cb228..fad2b6a25 100644 --- a/rtgui/batchqueue.h +++ b/rtgui/batchqueue.h @@ -68,7 +68,7 @@ protected: void notifyListener (bool queueEmptied); public: - BatchQueue (FileCatalog* aFileCatalog); + explicit BatchQueue (FileCatalog* aFileCatalog); ~BatchQueue (); void addEntries (const std::vector& entries, bool head = false, bool save = true); diff --git a/rtgui/batchqueuebuttonset.h b/rtgui/batchqueuebuttonset.h index cb6ccda56..bef125bb6 100644 --- a/rtgui/batchqueuebuttonset.h +++ b/rtgui/batchqueuebuttonset.h @@ -33,7 +33,7 @@ public: static Cairo::RefPtr headIcon; static Cairo::RefPtr tailIcon; - BatchQueueButtonSet (BatchQueueEntry* myEntry); + explicit BatchQueueButtonSet (BatchQueueEntry* myEntry); }; #endif diff --git a/rtgui/batchqueueentry.cc b/rtgui/batchqueueentry.cc index b8bc45601..f8f9e4627 100644 --- a/rtgui/batchqueueentry.cc +++ b/rtgui/batchqueueentry.cc @@ -31,7 +31,7 @@ Glib::RefPtr BatchQueueEntry::savedAsIcon; BatchQueueEntry::BatchQueueEntry (rtengine::ProcessingJob* pjob, const rtengine::procparams::ProcParams& pparams, Glib::ustring fname, int prevw, int prevh, Thumbnail* thm) : ThumbBrowserEntryBase(fname), - opreview(NULL), origpw(prevw), origph(prevh), opreviewDone(false), + opreview(nullptr), origpw(prevw), origph(prevh), opreviewDone(false), job(pjob), progress(0), outFileName(""), sequence(0), forceFormatOpts(false), params(pparams) { @@ -64,7 +64,7 @@ BatchQueueEntry::~BatchQueueEntry () delete [] opreview; } - opreview = NULL; + opreview = nullptr; if (thumbnail) { thumbnail->decreaseRef (); @@ -84,7 +84,7 @@ void BatchQueueEntry::refreshThumbnailImage () // creating the image buffer first //if (!opreview) opreview = new guint8[(origpw+1) * origph * 3]; // this will asynchronously compute the original preview and land at this.updateImage - batchQueueEntryUpdater.process (NULL, origpw, origph, preh, this, ¶ms, thumbnail); + batchQueueEntryUpdater.process (nullptr, origpw, origph, preh, this, ¶ms, thumbnail); } else { // this will asynchronously land at this.updateImage batchQueueEntryUpdater.process (opreview, origpw, origph, preh, this); @@ -133,7 +133,7 @@ void BatchQueueEntry::removeButtonSet () { delete buttonSet; - buttonSet = NULL; + buttonSet = nullptr; } std::vector > BatchQueueEntry::getIconsOnImageArea () @@ -247,7 +247,7 @@ void BatchQueueEntry::_updateImage (guint8* img, int w, int h) MYWRITERLOCK(l, lockRW); prew = w; - assert (preview == NULL); + assert (preview == nullptr); preview = new guint8 [prew * preh * 3]; memcpy (preview, img, prew * preh * 3); diff --git a/rtgui/batchqueueentry.h b/rtgui/batchqueueentry.h index 4ee3eb1a3..c2651a3ca 100644 --- a/rtgui/batchqueueentry.h +++ b/rtgui/batchqueueentry.h @@ -54,7 +54,7 @@ public: SaveFormat saveFormat; bool forceFormatOpts; - BatchQueueEntry (rtengine::ProcessingJob* job, const rtengine::procparams::ProcParams& pparams, Glib::ustring fname, int prevw, int prevh, Thumbnail* thm = NULL); + BatchQueueEntry (rtengine::ProcessingJob* job, const rtengine::procparams::ProcParams& pparams, Glib::ustring fname, int prevw, int prevh, Thumbnail* thm = nullptr); ~BatchQueueEntry (); void refreshThumbnailImage (); diff --git a/rtgui/batchqueuepanel.cc b/rtgui/batchqueuepanel.cc index 2c7f81729..15f0b88ad 100644 --- a/rtgui/batchqueuepanel.cc +++ b/rtgui/batchqueuepanel.cc @@ -24,10 +24,6 @@ #include "soundman.h" #include "rtimage.h" -struct BQProcessLoaded { - BatchQueue* bq; -}; - int processLoadedBatchQueueUIThread (void* data) { @@ -107,7 +103,7 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) Gtk::Image* folderImg = Gtk::manage (new Gtk::Image (Gtk::Stock::DIRECTORY, Gtk::ICON_SIZE_MENU)); folderImg->show (); outdirFolderButton->set_image (*folderImg); - outdirFolder = 0; + outdirFolder = nullptr; #else outdirFolder = Gtk::manage (new MyFileChooserButton (M("PREFERENCES_OUTDIRFOLDER"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); hb3->pack_start (*outdirFolder); @@ -184,7 +180,7 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) show_all (); if (batchQueue->loadBatchQueue ()) { - g_idle_add_full (G_PRIORITY_LOW, processLoadedBatchQueueUIThread, batchQueue, NULL); + g_idle_add_full (G_PRIORITY_LOW, processLoadedBatchQueueUIThread, batchQueue, nullptr); } } diff --git a/rtgui/batchqueuepanel.h b/rtgui/batchqueuepanel.h index 997514bef..675745b8a 100644 --- a/rtgui/batchqueuepanel.h +++ b/rtgui/batchqueuepanel.h @@ -55,7 +55,7 @@ class BatchQueuePanel : public Gtk::VBox, public: - BatchQueuePanel (FileCatalog* aFileCatalog); + explicit BatchQueuePanel (FileCatalog* aFileCatalog); void setParent (RTWindow* p) { diff --git a/rtgui/batchtoolpanelcoord.cc b/rtgui/batchtoolpanelcoord.cc index 0b3d65961..2caa61187 100644 --- a/rtgui/batchtoolpanelcoord.cc +++ b/rtgui/batchtoolpanelcoord.cc @@ -42,9 +42,13 @@ BatchToolPanelCoordinator::BatchToolPanelCoordinator (FilePanel* parent) : ToolP toolPanels.erase (ipi); } + if (toolBar) { + toolBar->setBatchMode (); + } + toolPanelNotebook->remove_page (*metadataPanel); - metadataPanel = 0; - toiM = 0; + metadataPanel = nullptr; + toiM = nullptr; for (size_t i = 0; i < toolPanels.size(); i++) { toolPanels[i]->setBatchMode (true); @@ -95,7 +99,7 @@ void BatchToolPanelCoordinator::closeSession (bool save) toolPanels[j]->trimValues (&newParams); } - selected[i]->setProcParams (newParams, NULL, BATCHEDITOR, true); + selected[i]->setProcParams (newParams, nullptr, BATCHEDITOR, true); } } @@ -844,7 +848,7 @@ void BatchToolPanelCoordinator::panelChanged (rtengine::ProcEvent event, const G toolPanels[j]->trimValues (&newParams); } - selected[i]->setProcParams (newParams, NULL, BATCHEDITOR, false); + selected[i]->setProcParams (newParams, nullptr, BATCHEDITOR, false); } for (size_t i = 0; i < paramcListeners.size(); i++) { @@ -946,7 +950,7 @@ void BatchToolPanelCoordinator::profileChange (const rtengine::procparams::Part for (size_t i = 0; i < selected.size(); i++) { newParams = initialPP[i]; pparamsEdited.combine (newParams, pparams, selected.size() == 1); - selected[i]->setProcParams (newParams, NULL, BATCHEDITOR, false); + selected[i]->setProcParams (newParams, nullptr, BATCHEDITOR, false); } for (size_t i = 0; i < paramcListeners.size(); i++) { diff --git a/rtgui/batchtoolpanelcoord.h b/rtgui/batchtoolpanelcoord.h index e064452b2..c96a1a329 100644 --- a/rtgui/batchtoolpanelcoord.h +++ b/rtgui/batchtoolpanelcoord.h @@ -48,7 +48,7 @@ protected: public: - BatchToolPanelCoordinator (FilePanel* parent); + explicit BatchToolPanelCoordinator (FilePanel* parent); // FileSelectionChangeListener interface void selectionChanged (const std::vector& selected); @@ -57,7 +57,7 @@ public: void panelChanged (rtengine::ProcEvent event, const Glib::ustring& descr); // profilechangelistener interface - void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = NULL); + void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = nullptr); // wbprovider interface void getAutoWB (double& temp, double& green, double equal); @@ -71,10 +71,10 @@ public: void endBatchPParamsChange(); // imageareatoollistener interface - void spotWBselected (int x, int y, Thumbnail* thm = NULL); + void spotWBselected (int x, int y, Thumbnail* thm = nullptr); void cropSelectionReady (); - void rotateSelectionReady (double rotate_deg, Thumbnail* thm = NULL); - CropGUIListener* startCropEditing (Thumbnail* thm = NULL); + void rotateSelectionReady (double rotate_deg, Thumbnail* thm = nullptr); + CropGUIListener* startCropEditing (Thumbnail* thm = nullptr); void optionsChanged (); }; diff --git a/rtgui/bayerpreprocess.h b/rtgui/bayerpreprocess.h index 3b7dce4dc..15b2ef7e5 100644 --- a/rtgui/bayerpreprocess.h +++ b/rtgui/bayerpreprocess.h @@ -36,10 +36,10 @@ public: BayerPreProcess (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void adjusterChanged (Adjuster* a, double newval); void hotDeadPixelChanged(); diff --git a/rtgui/bayerprocess.h b/rtgui/bayerprocess.h index 35b1cf084..b78002ea3 100644 --- a/rtgui/bayerprocess.h +++ b/rtgui/bayerprocess.h @@ -48,10 +48,10 @@ public: BayerProcess (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void methodChanged (); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/bayerrawexposure.h b/rtgui/bayerrawexposure.h index 94987ba1f..733aafc25 100644 --- a/rtgui/bayerrawexposure.h +++ b/rtgui/bayerrawexposure.h @@ -42,10 +42,10 @@ public: BayerRAWExposure (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void GreenChanged() ; void adjusterChanged (Adjuster* a, double newval); void setAdjusterBehavior (bool pexblackadd); diff --git a/rtgui/blackwhite.cc b/rtgui/blackwhite.cc index 69891b237..832c4c8ef 100644 --- a/rtgui/blackwhite.cc +++ b/rtgui/blackwhite.cc @@ -1196,7 +1196,7 @@ void BlackWhite::setBatchMode (bool batchMode) removeIfThere (mixerVBox, RGBLabels, false); delete RGBLabels; - RGBLabels = NULL; + RGBLabels = nullptr; ToolPanel::setBatchMode (batchMode); mixerRed->showEditedCB (); diff --git a/rtgui/blackwhite.h b/rtgui/blackwhite.h index d5e7c0a4f..e38258b04 100644 --- a/rtgui/blackwhite.h +++ b/rtgui/blackwhite.h @@ -101,9 +101,9 @@ public: BlackWhite (); ~BlackWhite (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void autoOpenCurve (); void setEditProvider (EditDataProvider *provider); diff --git a/rtgui/bqentryupdater.cc b/rtgui/bqentryupdater.cc index 596811c58..37ce4c0ef 100644 --- a/rtgui/bqentryupdater.cc +++ b/rtgui/bqentryupdater.cc @@ -23,7 +23,7 @@ BatchQueueEntryUpdater batchQueueEntryUpdater; BatchQueueEntryUpdater::BatchQueueEntryUpdater () - : tostop(false), stopped(true), thread(NULL), qMutex(NULL) + : tostop(false), stopped(true), thread(nullptr), qMutex(nullptr) { } @@ -106,7 +106,7 @@ void BatchQueueEntryUpdater::processThread () break; } - rtengine::IImage8* img = NULL; + rtengine::IImage8* img = nullptr; bool newBuffer = false; if (current.thumbnail && current.pparams) { @@ -143,12 +143,12 @@ void BatchQueueEntryUpdater::processThread () int neww = current.newh * current.ow / current.oh; guint8* img = new guint8 [current.newh * neww * 3]; thumbInterp (current.oimg, current.ow, current.oh, img, neww, current.newh); - current.listener->updateImage (img, neww, current.newh, current.ow, current.oh, newBuffer ? current.oimg : NULL); + current.listener->updateImage (img, neww, current.newh, current.ow, current.oh, newBuffer ? current.oimg : nullptr); } if(current.oimg) { delete[] current.oimg; - current.oimg = NULL; + current.oimg = nullptr; } } diff --git a/rtgui/bqentryupdater.h b/rtgui/bqentryupdater.h index 4052649cf..75040b109 100644 --- a/rtgui/bqentryupdater.h +++ b/rtgui/bqentryupdater.h @@ -53,7 +53,7 @@ protected: public: BatchQueueEntryUpdater (); - void process (guint8* oimg, int ow, int oh, int newh, BQEntryUpdateListener* listener, rtengine::ProcParams* pparams = NULL, Thumbnail* thumbnail = NULL); + void process (guint8* oimg, int ow, int oh, int newh, BQEntryUpdateListener* listener, rtengine::ProcParams* pparams = nullptr, Thumbnail* thumbnail = nullptr); void removeJobs (BQEntryUpdateListener* listener); void terminate (); diff --git a/rtgui/browserfilter.cc b/rtgui/browserfilter.cc index 6fa663aa3..3d43400ba 100644 --- a/rtgui/browserfilter.cc +++ b/rtgui/browserfilter.cc @@ -21,7 +21,8 @@ BrowserFilter::BrowserFilter () : exifFilterEnabled (false), showTrash (true), showNotTrash (true), - showOriginal (false) + showOriginal (false), + multiselect (false) { for (int i = 0; i < 6; i++) { showRanked[i] = true; diff --git a/rtgui/cacheimagedata.cc b/rtgui/cacheimagedata.cc index 75a6ab75a..220dcb2e8 100644 --- a/rtgui/cacheimagedata.cc +++ b/rtgui/cacheimagedata.cc @@ -24,7 +24,9 @@ CacheImageData::CacheImageData () : md5(""), supported(false), format(FT_Invalid), rankOld(-1), inTrashOld(false), recentlySaved(false), - timeValid(false), exifValid(false), redAWBMul(-1.0), greenAWBMul(-1.0), blueAWBMul(-1.0), thumbImgType(0) + timeValid(false), year(0), month(0), day(0), hour(0), min(0), sec(0), exifValid(false), + fnumber(0.0), shutter(0.0), focalLen(0.0), focalLen35mm(0.0), focusDist(0.f), iso(0), + redAWBMul(-1.0), greenAWBMul(-1.0), blueAWBMul(-1.0), rotate(0), thumbImgType(0) { } diff --git a/rtgui/cachemanager.h b/rtgui/cachemanager.h index 4460204cc..99c732e88 100644 --- a/rtgui/cachemanager.h +++ b/rtgui/cachemanager.h @@ -24,11 +24,14 @@ #include +#include "../rtengine/noncopyable.h" + #include "threadutils.h" class Thumbnail; -class CacheManager +class CacheManager : + public rtengine::NonCopyable { private: using Entries = std::map; @@ -41,12 +44,7 @@ private: void applyCacheSizeLimitation () const; - CacheManager () = default; - CacheManager (const CacheManager&) = delete; - CacheManager& operator= (const CacheManager&) = delete; - public: - static CacheManager* getInstance (); void init (); @@ -69,7 +67,6 @@ public: const Glib::ustring& fname, const Glib::ustring& fext, const Glib::ustring& md5) const; - }; #define cacheMgr CacheManager::getInstance() diff --git a/rtgui/cacorrection.h b/rtgui/cacorrection.h index 736242232..fd34bc942 100644 --- a/rtgui/cacorrection.h +++ b/rtgui/cacorrection.h @@ -34,9 +34,9 @@ public: CACorrection (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/chmixer.h b/rtgui/chmixer.h index 0bf65736a..bd85517de 100644 --- a/rtgui/chmixer.h +++ b/rtgui/chmixer.h @@ -36,9 +36,9 @@ public: ChMixer (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/clipboard.cc b/rtgui/clipboard.cc index ad3ea6386..a1b94a615 100644 --- a/rtgui/clipboard.cc +++ b/rtgui/clipboard.cc @@ -20,7 +20,7 @@ Clipboard clipboard; -Clipboard::Clipboard () : partProfile (false) {} +Clipboard::Clipboard () : partProfile (false), _hasIPTC(false), hasDiagonalCurveDataType(DCT_Empty), hasFlatCurveDataType(FCT_Empty) {} Clipboard::~Clipboard () { @@ -41,7 +41,7 @@ void Clipboard::setPartialProfile (const rtengine::procparams::PartialProfile& } else { if (partProfile.pparams) { delete partProfile.pparams; - partProfile.pparams = NULL; + partProfile.pparams = nullptr; } } @@ -54,7 +54,7 @@ void Clipboard::setPartialProfile (const rtengine::procparams::PartialProfile& } else { if (partProfile.pedited) { delete partProfile.pedited; - partProfile.pedited = NULL; + partProfile.pedited = nullptr; } } } @@ -74,6 +74,6 @@ void Clipboard::setProcParams (const rtengine::procparams::ProcParams& pparams) // delete pedited if (partProfile.pedited) { delete partProfile.pedited; - partProfile.pedited = NULL; + partProfile.pedited = nullptr; } } diff --git a/rtgui/coarsepanel.h b/rtgui/coarsepanel.h index abe31d518..7ac1bccc5 100644 --- a/rtgui/coarsepanel.h +++ b/rtgui/coarsepanel.h @@ -37,8 +37,8 @@ public: CoarsePanel (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void initBatchBehavior (); void rotateLeft (); diff --git a/rtgui/colorappearance.h b/rtgui/colorappearance.h index 04fe2a3bb..1560e275e 100644 --- a/rtgui/colorappearance.h +++ b/rtgui/colorappearance.h @@ -95,9 +95,9 @@ public: ColorAppearance (); ~ColorAppearance (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); void adjusterAutoToggled (Adjuster* a, bool newval); diff --git a/rtgui/coloredbar.cc b/rtgui/coloredbar.cc index 64e60b136..c6a8ec730 100644 --- a/rtgui/coloredbar.cc +++ b/rtgui/coloredbar.cc @@ -201,5 +201,5 @@ void ColoredBar::clearBgGradient () bool ColoredBar::canGetColors() { - return colorProvider != NULL || bgGradient.size() > 0; + return colorProvider != nullptr || bgGradient.size() > 0; } diff --git a/rtgui/coloredbar.h b/rtgui/coloredbar.h index 917085e3c..237cd8595 100644 --- a/rtgui/coloredbar.h +++ b/rtgui/coloredbar.h @@ -37,7 +37,7 @@ protected: std::vector bgGradient; public: - ColoredBar (eRTOrientation orient); + explicit ColoredBar (eRTOrientation orient); void expose(Glib::RefPtr destWindow); void expose(Cairo::RefPtr destSurface); diff --git a/rtgui/colorprovider.h b/rtgui/colorprovider.h index ce0c25247..ab6fb2865 100644 --- a/rtgui/colorprovider.h +++ b/rtgui/colorprovider.h @@ -45,7 +45,7 @@ public: double ccGreen; double ccBlue; - ColorCaller() : colorCallerId(-1), colorProvider(NULL), ccRed(0.), ccGreen(0.), ccBlue(0.) {} + ColorCaller() : colorCallerId(-1), colorProvider(nullptr), ccRed(0.), ccGreen(0.), ccBlue(0.) {} void setColorProvider (ColorProvider* p, int id) { colorProvider = p; diff --git a/rtgui/colortoning.cc b/rtgui/colortoning.cc index 99ad03e9f..a4d28c104 100644 --- a/rtgui/colortoning.cc +++ b/rtgui/colortoning.cc @@ -40,7 +40,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR colorCurveEditorG = new CurveEditorGroup (options.lastColorToningCurvesDir, M("TP_COLORTONING_COLOR")); colorCurveEditorG->setCurveListener (this); - colorShape = static_cast(colorCurveEditorG->addCurve(CT_Flat, "", NULL, false)); + colorShape = static_cast(colorCurveEditorG->addCurve(CT_Flat, "", nullptr, false, false)); colorShape->setCurveColorProvider(this, 1); std::vector milestones; @@ -89,7 +89,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR opacityCurveEditorG->setCurveListener (this); rtengine::ColorToningParams::getDefaultOpacityCurve(defaultCurve); - opacityShape = static_cast(opacityCurveEditorG->addCurve(CT_Flat, "", NULL, false)); + opacityShape = static_cast(opacityCurveEditorG->addCurve(CT_Flat, "", nullptr, false, false)); opacityShape->setIdentityValue(0.); opacityShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); opacityShape->setBottomBarBgGradient(milestones); @@ -108,7 +108,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR clCurveEditorG->setCurveListener (this); rtengine::ColorToningParams::getDefaultCLCurve(defaultCurve); - clshape = static_cast(clCurveEditorG->addCurve(CT_Diagonal, M("TP_COLORTONING_AB"), irg)); + clshape = static_cast(clCurveEditorG->addCurve(CT_Diagonal, M("TP_COLORTONING_AB"), irg, false)); clshape->setResetCurve(DiagonalCurveType(defaultCurve.at(0)), defaultCurve); clshape->setTooltip(M("TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP")); @@ -128,7 +128,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR cl2CurveEditorG->setCurveListener (this); rtengine::ColorToningParams::getDefaultCL2Curve(defaultCurve); - cl2shape = static_cast(cl2CurveEditorG->addCurve(CT_Diagonal, M("TP_COLORTONING_BY"), iby)); + cl2shape = static_cast(cl2CurveEditorG->addCurve(CT_Diagonal, M("TP_COLORTONING_BY"), iby, false)); cl2shape->setResetCurve(DiagonalCurveType(defaultCurve.at(0)), defaultCurve); cl2shape->setTooltip(M("TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP")); @@ -156,14 +156,14 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR //----------- Sliders + balance ------------------------------ - hlColSat = Gtk::manage (new ThresholdAdjuster (M("TP_COLORTONING_HIGHLIGHT"), 0., 100., 60., M("TP_COLORTONING_STRENGTH"), 1., 0., 360., 80., M("TP_COLORTONING_HUE"), 1., NULL, false)); + hlColSat = Gtk::manage (new ThresholdAdjuster (M("TP_COLORTONING_HIGHLIGHT"), 0., 100., 60., M("TP_COLORTONING_STRENGTH"), 1., 0., 360., 80., M("TP_COLORTONING_HUE"), 1., nullptr, false)); hlColSat->setAdjusterListener (this); hlColSat->setBgColorProvider(this, 2); hlColSat->setUpdatePolicy(RTUP_DYNAMIC); pack_start( *hlColSat, Gtk::PACK_SHRINK, 0); - shadowsColSat = Gtk::manage (new ThresholdAdjuster (M("TP_COLORTONING_SHADOWS"), 0., 100., 80., M("TP_COLORTONING_STRENGTH"), 1., 0., 360., 208., M("TP_COLORTONING_HUE"), 1., NULL, false)); + shadowsColSat = Gtk::manage (new ThresholdAdjuster (M("TP_COLORTONING_SHADOWS"), 0., 100., 80., M("TP_COLORTONING_STRENGTH"), 1., 0., 360., 208., M("TP_COLORTONING_HUE"), 1., nullptr, false)); shadowsColSat->setAdjusterListener (this); shadowsColSat->setBgColorProvider(this, 3); shadowsColSat->setUpdatePolicy(RTUP_DYNAMIC); diff --git a/rtgui/colortoning.h b/rtgui/colortoning.h index e55ff36e8..e34447301 100644 --- a/rtgui/colortoning.h +++ b/rtgui/colortoning.h @@ -78,10 +78,10 @@ protected: public: ColorToning (); ~ColorToning(); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void trimValues (rtengine::procparams::ProcParams* pp); void adjusterChanged (Adjuster* a, double newval); void adjusterChanged (ThresholdAdjuster* a, double newBottom, double newTop); diff --git a/rtgui/coordinateadjuster.cc b/rtgui/coordinateadjuster.cc index 61b5ae8b8..a9c0d2f2d 100644 --- a/rtgui/coordinateadjuster.cc +++ b/rtgui/coordinateadjuster.cc @@ -124,9 +124,8 @@ void CoordinateAdjuster::createWidgets(const std::vector &axis) set_spacing(3); - AxisAdjuster *currAdjuster = NULL; - for (unsigned int i = 0; i < count; ++i) { + AxisAdjuster *currAdjuster = nullptr; const Axis *currAxis = &(axis.at(i)); axisAdjusters.at(i) = new AxisAdjuster(this, currAxis, i); currAdjuster = axisAdjusters.at(i); diff --git a/rtgui/coordinateadjuster.h b/rtgui/coordinateadjuster.h index 8f00f8ae7..bcb5b6bf1 100644 --- a/rtgui/coordinateadjuster.h +++ b/rtgui/coordinateadjuster.h @@ -47,7 +47,7 @@ class CoordinateProvider protected: CoordinateAdjuster *coordinateAdjuster; public: - CoordinateProvider() : coordinateAdjuster(NULL) {} + CoordinateProvider() : coordinateAdjuster(nullptr) {} virtual ~CoordinateProvider() {} void setListener(CoordinateAdjuster *adjuster) { diff --git a/rtgui/createicon.cc b/rtgui/createicon.cc deleted file mode 100644 index 32884c182..000000000 --- a/rtgui/createicon.cc +++ /dev/null @@ -1,223 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * Copyright (c) 2004-2010 Gabor Horvath - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RawTherapee. If not, see . - */ -#include - -void png_read_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_size_t check; - - /* fread() returns 0 on error, so it is OK to store this in a png_size_t - * instead of an int, which is what fread() actually returns. - */ - check = (png_size_t)fread(data, (png_size_t)1, length, (FILE *)png_ptr->io_ptr); - - if (check != length) { - png_error(png_ptr, "Read Error"); - } -} - -void png_write_data(png_structp png_ptr, png_bytep data, png_size_t length) -{ - png_uint_32 check; - - check = fwrite(data, 1, length, (FILE *)(png_ptr->io_ptr)); - - if (check != length) { - png_error(png_ptr, "Write Error"); - } -} - -void png_flush(png_structp png_ptr) -{ - FILE *io_ptr; - io_ptr = (FILE *)CVT_PTR((png_ptr->io_ptr)); - - if (io_ptr != NULL) { - fflush(io_ptr); - } -} - - -unsigned char* loadPNG (char* fname, int& w, int& h) -{ - - FILE *file = fopen (fname, "rb"); - - unsigned char header[8]; - fread (header, 1, 8, file); - - png_structp png = png_create_read_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); - png_infop info = png_create_info_struct (png); - png_infop end_info = png_create_info_struct (png); - - if (setjmp (png_jmpbuf(png))) { - png_destroy_read_struct (&png, &info, &end_info); - fclose (file); - return NULL; - } - - //set up png read - png_set_read_fn (png, file, png_read_data); - png_set_sig_bytes (png, 8); - - png_read_info(png, info); - - unsigned long width, height; - int bit_depth, color_type, interlace_type, compression_type, filter_method; - png_get_IHDR(png, info, &width, &height, &bit_depth, &color_type, &interlace_type, - &compression_type, &filter_method); - - //converting to 32bpp format - if (color_type == PNG_COLOR_TYPE_PALETTE) { - png_set_palette_to_rgb(png); - } - - if (color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { - png_set_gray_to_rgb(png); - } - - if (png_get_valid(png, info, PNG_INFO_tRNS)) { - png_set_tRNS_to_alpha(png); - } - - if (interlace_type != PNG_INTERLACE_NONE) { - png_destroy_read_struct (&png, &info, &end_info); - fclose (file); - return NULL; - } - - if (color_type & PNG_COLOR_MASK_ALPHA) { - png_set_strip_alpha(png); - } - - //setting gamma - double gamma; - - if (png_get_gAMA(png, info, &gamma)) { - png_set_gamma(png, 2.0, gamma); - } else { - png_set_gamma(png, 2.0, 0.45455); - } - - int bps = 8; - - //updating png info struct - png_read_update_info(png, info); - png_get_IHDR(png, info, &width, &height, &bit_depth, &color_type, &interlace_type, - &compression_type, &filter_method); - - if (color_type & PNG_COLOR_MASK_ALPHA) { - png_set_strip_alpha(png); - } - - png_read_update_info(png, info); - png_get_IHDR(png, info, &width, &height, &bit_depth, &color_type, &interlace_type, - &compression_type, &filter_method); - - - unsigned char* data = new unsigned char[width * height * 3]; - int rowlen = width * 3; - unsigned char *row = new unsigned char [rowlen]; - - for (unsigned int i = 0; i < height; i++) { - - png_read_row (png, (png_byte*)row, NULL); - memcpy (data + 3 * i * width, row, 3 * width); - } - - png_read_end (png, 0); - png_destroy_read_struct (&png, &info, &end_info); - - delete [] row; - fclose(file); - - w = width; - h = height; - return data; -} - -void savePNG (char* fname, unsigned char* data1, unsigned char* data2, int w, int h) -{ - - FILE* file = fopen(fname, "wb"); - - png_structp png = png_create_write_struct (PNG_LIBPNG_VER_STRING, 0, 0, 0); - png_infop info = png_create_info_struct(png); - - if (setjmp(png_jmpbuf(png))) { - png_destroy_write_struct (&png, &info); - fclose(file); - return; - } - - png_set_write_fn (png, file, png_write_data, png_flush); - png_set_compression_level(png, 6); - - int width = w; - int height = h; - int bps = 8; - - png_set_IHDR(png, info, width, height, bps, PNG_COLOR_TYPE_RGB_ALPHA, - PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_BASE); - - - int rowlen = width * 4; - unsigned char *row = new unsigned char [rowlen]; - - png_write_info(png, info); - - for (unsigned int i = 0; i < height; i++) { - for (int j = 0; j < width; j++) { - int ofs = 3 * (width * i + j); - unsigned char alpha = data2[ofs] - data1[ofs]; - - if (i == 8 && j == 8) { - printf ("alpha=%d pix=%d\n", (int)alpha, (int)(data1[ofs + 0] / (1.0 - alpha / 255.0))); - } - - if (alpha < 255) { - row[4 * j + 0] = data1[ofs + 0] / (1.0 - alpha / 255.0); - row[4 * j + 1] = data1[ofs + 1] / (1.0 - alpha / 255.0); - row[4 * j + 2] = data1[ofs + 2] / (1.0 - alpha / 255.0); - } else { - - } - - row[4 * j + 3] = 255 - alpha; - } - - png_write_row (png, (png_byte*)row); - } - - png_write_end(png, info); - png_destroy_write_struct(&png, &info); - - delete [] row; - fclose (file); -} - -int main (int argc, char* argv[]) -{ - - int w, h; - unsigned char* data1 = loadPNG (argv[1], w, h); - unsigned char* data2 = loadPNG (argv[2], w, h); - savePNG (argv[3], data1, data2, w, h); - -} diff --git a/rtgui/crop.cc b/rtgui/crop.cc index 609ab9e64..ab8a7a8cc 100644 --- a/rtgui/crop.cc +++ b/rtgui/crop.cc @@ -38,7 +38,7 @@ public: Crop::Crop (): FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true) { - clistener = NULL; + clistener = nullptr; maxw = 3000; maxh = 2000; @@ -1283,7 +1283,7 @@ double Crop::getRatio () double r = -1.0; - if (fixr->get_active() == false) { + if (!fixr->get_active()) { return r; } diff --git a/rtgui/crop.h b/rtgui/crop.h index 2b29e46aa..61eff4bd7 100644 --- a/rtgui/crop.h +++ b/rtgui/crop.h @@ -73,8 +73,8 @@ public: Crop (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void ratioChanged (); diff --git a/rtgui/crophandler.cc b/rtgui/crophandler.cc index a76f23717..c22b5b529 100644 --- a/rtgui/crophandler.cc +++ b/rtgui/crophandler.cc @@ -22,6 +22,7 @@ #include #include "guiutils.h" #include "cropwindow.h" +#include "imagearea.h" #include "../rtengine/dcrop.h" #include "../rtengine/refreshmap.h" #include "../rtengine/rt_math.h" @@ -31,9 +32,10 @@ using namespace rtengine; CropHandler::CropHandler () : zoom(10), ww(0), wh(0), imx(-1), imy(-1), imw(0), imh(0), cax(-1), cay(-1), cx(0), cy(0), cw(0), ch(0), cropX(0), cropY(0), cropW(0), cropH(0), enabled(false), - cropimg(NULL), cropimgtrue(NULL), cropimg_width(0), cropimg_height(0), - initial(false), isLowUpdatePriority(false), ipc(NULL), crop(NULL), - displayHandler(NULL) + cropimg(nullptr), cropimgtrue(nullptr), cropimg_width(0), cropimg_height(0), + cix(0), ciy(0), ciw(0), cih(0), cis(1), + initial(false), isLowUpdatePriority(false), ipc(nullptr), crop(nullptr), + displayHandler(nullptr) { chi = new CropHandlerIdleHelper; @@ -54,7 +56,7 @@ CropHandler::~CropHandler () if (crop) { //crop->destroy (); delete crop; // will do the same than destroy, plus delete the object - crop = NULL; + crop = nullptr; } cimg.lock (); @@ -84,8 +86,8 @@ void CropHandler::newImage (StagedImageProcessor* ipc_, bool isDetailWindow) return; } - EditDataProvider *editDataProvider = NULL; - CropWindow *cropWin = displayHandler ? static_cast(displayHandler) : NULL; + EditDataProvider *editDataProvider = nullptr; + CropWindow *cropWin = displayHandler ? static_cast(displayHandler) : nullptr; if (cropWin) { editDataProvider = cropWin->getImageArea(); @@ -93,7 +95,7 @@ void CropHandler::newImage (StagedImageProcessor* ipc_, bool isDetailWindow) crop = ipc->createCrop (editDataProvider, isDetailWindow); ipc->setSizeListener (this); - crop->setListener (enabled ? this : NULL); + crop->setListener (enabled ? this : nullptr); initial = true; } @@ -108,6 +110,16 @@ void CropHandler::sizeChanged (int x, int y, int ow, int oh) // the ipc notif */ } +bool CropHandler::isFullDisplay () +{ + int w, h; + getFullImageSize(w, h); + if (!w) { + return false; + } + return cropW == w && cropH == h; +} + double CropHandler::getFitCropZoom () { double z1 = (double) wh / cropParams.h; @@ -188,6 +200,15 @@ void CropHandler::setZoom (int z, int centerx, int centery) } } +float CropHandler::getZoomFactor () +{ + if (zoom >= 1000) { + return zoom / 1000; + } else { + return 1.f / (float)zoom; + } +} + void CropHandler::setWSize (int w, int h) { @@ -295,9 +316,9 @@ int createpixbufs (void* data) if (!ch->enabled) { delete [] ch->cropimg; - ch->cropimg = NULL; + ch->cropimg = nullptr; delete [] ch->cropimgtrue; - ch->cropimgtrue = NULL; + ch->cropimgtrue = nullptr; ch->cimg.unlock (); return 0; } @@ -329,9 +350,9 @@ int createpixbufs (void* data) } delete [] ch->cropimg; - ch->cropimg = NULL; + ch->cropimg = nullptr; delete [] ch->cropimgtrue; - ch->cropimgtrue = NULL; + ch->cropimgtrue = nullptr; } ch->cimg.unlock (); @@ -369,13 +390,13 @@ void CropHandler::setDetailedCrop (IImage8* im, IImage8* imtrue, rtengine::procp delete [] cropimg; } - cropimg = NULL; + cropimg = nullptr; if (cropimgtrue) { delete [] cropimgtrue; } - cropimgtrue = NULL; + cropimgtrue = nullptr; if (ax == cropX && ay == cropY && aw == cropW && ah == cropH && askip == (zoom >= 1000 ? 1 : zoom)) { cropimg_width = im->getWidth (); @@ -444,14 +465,14 @@ void CropHandler::setEnabled (bool e) if (!enabled) { if (crop) { - crop->setListener (NULL); + crop->setListener (nullptr); } cimg.lock (); delete [] cropimg; - cropimg = NULL; + cropimg = nullptr; delete [] cropimgtrue; - cropimgtrue = NULL; + cropimgtrue = nullptr; cropPixbuf.clear (); cimg.unlock (); } else { @@ -465,6 +486,95 @@ bool CropHandler::getEnabled () return enabled; } +void CropHandler::colorPick (const rtengine::Coord &pickerPos, float &r, float &g, float &b, float &rpreview, float &gpreview, float &bpreview, LockableColorPicker::Size size) +{ + + if (!cropPixbuf || !cropPixbuftrue) { + r = g = b = 0.f; + rpreview = gpreview = bpreview = 0.f; + return; + } + + int xSize = (int)size; + int ySize = (int)size; + int pixbufW = cropPixbuftrue->get_width(); + int pixbufH = cropPixbuftrue->get_height(); + rtengine::Coord topLeftPos(pickerPos.x - xSize/2, pickerPos.y - ySize/2); + + if (topLeftPos.x > pixbufW || topLeftPos.y > pixbufH || topLeftPos.x + xSize < 0 || topLeftPos.y + ySize < 0) { + return; + } + + // Store the position of the center of the picker + int radius = (int)size / 2; + + // X/Width clip + if (topLeftPos.x < 0) { + xSize += topLeftPos.x; + topLeftPos.x = 0; + } + if (topLeftPos.x + xSize > pixbufW) { + xSize = pixbufW - topLeftPos.x; + } + // Y/Height clip + if (topLeftPos.y < 0) { + ySize += topLeftPos.y; + topLeftPos.y = 0; + } + if (topLeftPos.y + ySize > pixbufH) { + ySize = pixbufH - topLeftPos.y; + } + + // Accumulating the data + std::uint32_t r2=0, g2=0, b2=0; + std::uint32_t count = 0; + const guint8* data = cropPixbuftrue->get_pixels(); + for (int j = topLeftPos.y ; j < topLeftPos.y + ySize ; ++j) { + const guint8* data2 = data + cropPixbuftrue->get_rowstride()*j; + for (int i = topLeftPos.x ; i < topLeftPos.x + xSize ; ++i) { + const guint8* data3 = data2 + i*3; + rtengine::Coord currPos(i, j); + rtengine::Coord delta = pickerPos - currPos; + rtengine::PolarCoord p(delta); + if (p.radius <= radius) { + r2 += *data3; + g2 += *(data3+1); + b2 += *(data3+2); + ++count; + } + } + } + + // Averaging + r = (float)r2 / (float)count / 255.f; + g = (float)g2 / (float)count / 255.f; + b = (float)b2 / (float)count / 255.f; + + // Accumulating the data + r2=0, g2=0, b2=0; + count = 0; + data = cropPixbuf->get_pixels(); + for (int j = topLeftPos.y ; j < topLeftPos.y + ySize ; ++j) { + const guint8* data2 = data + cropPixbuf->get_rowstride()*j; + for (int i = topLeftPos.x ; i < topLeftPos.x + xSize ; ++i) { + const guint8* data3 = data2 + i*3; + rtengine::Coord currPos(i, j); + rtengine::Coord delta = pickerPos - currPos; + rtengine::PolarCoord p(delta); + if (p.radius <= radius) { + r2 += *data3; + g2 += *(data3+1); + b2 += *(data3+2); + ++count; + } + } + } + // Averaging + rpreview = (float)r2 / (float)count / 255.f; + gpreview = (float)g2 / (float)count / 255.f; + bpreview = (float)b2 / (float)count / 255.f; +} + void CropHandler::getSize (int& w, int& h) { diff --git a/rtgui/crophandler.h b/rtgui/crophandler.h index 6e479bb16..3bf7e58da 100644 --- a/rtgui/crophandler.h +++ b/rtgui/crophandler.h @@ -22,6 +22,7 @@ #include "../rtengine/rtengine.h" #include "threadutils.h" #include "edit.h" +#include "lockablecolorpicker.h" #include class CropDisplayHandler @@ -94,23 +95,27 @@ public: } void setEditSubscriber (EditSubscriber* newSubscriber); - void newImage (rtengine::StagedImageProcessor* ipc_, bool isDetailWindow); - void setZoom (int z, int centerx = -1, int centery = -1); - double getFitZoom (); + void newImage (rtengine::StagedImageProcessor* ipc_, bool isDetailWindow); + void setZoom (int z, int centerx = -1, int centery = -1); + float getZoomFactor (); + double getFitZoom (); double getFitCropZoom(); - void setWSize (int w, int h); - void getWSize (int& w, int &h); + bool isFullDisplay (); + void setWSize (int w, int h); + void getWSize (int& w, int &h); void getAnchorPosition (int& x, int& y); void setAnchorPosition (int x, int y, bool update = true); - void moveAnchor (int deltaX, int deltaY, bool update = true); - void centerAnchor (bool update = true); - void getPosition (int& x, int& y); - void getSize (int& w, int& h); + void moveAnchor (int deltaX, int deltaY, bool update = true); + void centerAnchor (bool update = true); + void getPosition (int& x, int& y); + void getSize (int& w, int& h); void getFullImageSize (int& w, int& h); void setEnabled (bool e); bool getEnabled (); + void colorPick (const rtengine::Coord &pickerPos, float &r, float &g, float &b, float &rpreview, float &gpreview, float &bpreview, LockableColorPicker::Size size); + rtengine::DetailedCrop* getCrop() { return crop; diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index c4b555e8f..0fc3359bc 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -30,6 +30,7 @@ #include "cursormanager.h" #include "options.h" #include "imagearea.h" +#include "lockablecolorpicker.h" using namespace rtengine; @@ -65,13 +66,13 @@ ZoomStep zoomSteps[] = { #define MAXZOOMSTEPS 20 #define ZOOM11INDEX 13 -CropWindow::CropWindow (ImageArea* parent, rtengine::StagedImageProcessor* ipc_, bool isLowUpdatePriority_, bool isDetailWindow) +CropWindow::CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDetailWindow) : ObjectMOBuffer(parent), state(SNormal), press_x(0), press_y(0), action_x(0), action_y(0), pickedObject(-1), pickModifierKey(0), rot_deg(0), onResizeArea(false), deleted(false), - fitZoomEnabled(true), fitZoom(false), isLowUpdatePriority(isLowUpdatePriority_), cropLabel(Glib::ustring("100%")), + fitZoomEnabled(true), fitZoom(false), isLowUpdatePriority(isLowUpdatePriority_), hoveredPicker(nullptr), cropLabel(Glib::ustring("100%")), backColor(options.bgcolor), decorated(true), isFlawnOver(false), titleHeight(30), sideBorderWidth(3), lowerBorderWidth(3), upperBorderWidth(1), sepWidth(2), xpos(30), ypos(30), width(0), height(0), imgAreaX(0), imgAreaY(0), imgAreaW(0), imgAreaH(0), - imgX(-1), imgY(-1), imgW(1), imgH(1), iarea(parent), cropZoom(0), zoomVersion(0), exposeVersion(0), cropgl(NULL), - pmlistener(NULL), pmhlistener(NULL), observedCropWin(NULL), ipc(ipc_) + imgX(-1), imgY(-1), imgW(1), imgH(1), iarea(parent), cropZoom(0), zoomVersion(0), exposeVersion(0), cropgl(nullptr), + pmlistener(nullptr), pmhlistener(nullptr), observedCropWin(nullptr) { Glib::RefPtr context = parent->get_pango_context () ; Pango::FontDescription fontd = context->get_font_description (); @@ -85,11 +86,11 @@ CropWindow::CropWindow (ImageArea* parent, rtengine::StagedImageProcessor* ipc_, titleHeight = ih; - bZoomOut = new LWButton (RTImage::createFromPng ("gtk-zoom-out-small.png"), 0, NULL, LWButton::Left, LWButton::Center, "Zoom Out"); - bZoomIn = new LWButton (RTImage::createFromPng ("gtk-zoom-in-small.png"), 1, NULL, LWButton::Left, LWButton::Center, "Zoom In"); - bZoom100 = new LWButton (RTImage::createFromPng ("gtk-zoom-100-small.png"), 2, NULL, LWButton::Left, LWButton::Center, "Zoom 100/%"); + bZoomOut = new LWButton (RTImage::createFromPng ("gtk-zoom-out-small.png"), 0, nullptr, LWButton::Left, LWButton::Center, "Zoom Out"); + bZoomIn = new LWButton (RTImage::createFromPng ("gtk-zoom-in-small.png"), 1, nullptr, LWButton::Left, LWButton::Center, "Zoom In"); + bZoom100 = new LWButton (RTImage::createFromPng ("gtk-zoom-100-small.png"), 2, nullptr, LWButton::Left, LWButton::Center, "Zoom 100/%"); //bZoomFit = new LWButton (RTImage::createFromPng ("gtk-zoom-fit.png"), 3, NULL, LWButton::Left, LWButton::Center, "Zoom Fit"); - bClose = new LWButton (RTImage::createFromPng ("gtk-close-small.png"), 4, NULL, LWButton::Right, LWButton::Center, "Close"); + bClose = new LWButton (RTImage::createFromPng ("gtk-close-small.png"), 4, nullptr, LWButton::Right, LWButton::Center, "Close"); buttonSet.add (bZoomOut); buttonSet.add (bZoomIn); @@ -109,7 +110,14 @@ CropWindow::CropWindow (ImageArea* parent, rtengine::StagedImageProcessor* ipc_, minWidth = bsw + iw + 2 * sideBorderWidth; cropHandler.setDisplayHandler(this); - cropHandler.newImage (ipc_, isDetailWindow); + cropHandler.newImage (parent->getImProcCoordinator(), isDetailWindow); +} + +CropWindow::~CropWindow () +{ + for (auto colorPicker : colorPickers) { + delete colorPicker; + } } void CropWindow::enable() @@ -265,6 +273,34 @@ void CropWindow::flawnOver (bool isFlawnOver) this->isFlawnOver = isFlawnOver; } +void CropWindow::scroll (int state, GdkScrollDirection direction, int x, int y) +{ + if ((state & GDK_CONTROL_MASK) && onArea(ColorPicker, x, y)) { + // resizing a color picker + if (direction == GDK_SCROLL_UP) { + hoveredPicker->incSize(); + updateHoveredPicker(); + iarea->redraw (); + }else if (direction == GDK_SCROLL_DOWN) { + hoveredPicker->decSize(); + updateHoveredPicker(); + iarea->redraw (); + } + } else { + // not over a color picker, we zoom in/out + int newCenterX = x; + int newCenterY = y; + + screenCoordToImage(newCenterX, newCenterY, newCenterX, newCenterY); + + if (direction == GDK_SCROLL_UP && !isMaxZoom()) { + zoomIn (true, newCenterX, newCenterY); + } else if (!isMinZoom()) { + zoomOut (true, newCenterX, newCenterY); + } + } +} + void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) { @@ -274,7 +310,7 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) iarea->grabFocus (this); if (button == 1) { - if (type == GDK_2BUTTON_PRESS && onArea (CropImage, x, y) && (state == SNormal || state == SCropImgMove)) { + if (type == GDK_2BUTTON_PRESS && onArea (CropImage, x, y) && iarea->getToolMode () != TMColorPicker && (state == SNormal || state == SCropImgMove)) { if (fitZoomEnabled) { if (fitZoom) { state = SNormal; @@ -308,7 +344,35 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) press_y = height; } else { if (onArea (CropImage, x, y)) { // events inside of the image domain - if (onArea (CropTopLeft, x, y)) { + if (iarea->getToolMode () == TMColorPicker) { + if (hoveredPicker) { + if ((bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { + hoveredPicker->decSize(); + updateHoveredPicker(); + needRedraw = true; + } else if (!(bstate & GDK_CONTROL_MASK) && (bstate & GDK_SHIFT_MASK)) { + hoveredPicker->rollDisplayedValues(); + needRedraw = true; + } else if (!(bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { + // Color Picker drag starts + state = SDragPicker; + } + } else { + // Add a new Color Picker + rtengine::Coord imgPos; + screenCoordToImage(x, y, imgPos.x, imgPos.y); + LockableColorPicker *newPicker = new LockableColorPicker(this, &cropHandler.colorParams.output, &cropHandler.colorParams.working); + colorPickers.push_back(newPicker); + hoveredPicker = newPicker; + updateHoveredPicker(&imgPos); + state = SDragPicker; + press_x = x; + press_y = y; + action_x = 0; + action_y = 0; + needRedraw = true; + } + } else if (onArea (CropTopLeft, x, y)) { state = SResizeTL; press_x = x; action_x = cropHandler.cropParams.x; @@ -430,6 +494,18 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) action_x = 0; action_y = 0; } + } else if (iarea->getToolMode () == TMColorPicker && hoveredPicker) { + if ((bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { + if (hoveredPicker->decSize()) { + updateHoveredPicker(); + needRedraw = true; + } + } else if (!(bstate & GDK_CONTROL_MASK) && (bstate & GDK_SHIFT_MASK)) { + hoveredPicker->rollDisplayedValues(); + } else if (!(bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { + // Color Picker drag starts + state = SDragPicker; + } } } } @@ -473,6 +549,37 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) action_y = 0; } } + else if (iarea->getToolMode () == TMColorPicker && type == GDK_BUTTON_PRESS && state == SNormal) { + if (hoveredPicker) { + if((bstate & GDK_CONTROL_MASK) && (bstate & GDK_SHIFT_MASK)) { + // Deleting all pickers ! + for (auto colorPicker : colorPickers) { + delete colorPicker; + } + colorPickers.clear(); + hoveredPicker = nullptr; + state = SDeletePicker; + needRedraw = true; + } else if ((bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { + if (hoveredPicker->incSize()) { + updateHoveredPicker(); + needRedraw = true; + } + } else if (!(bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { + // Deleting the hovered picker + for (std::vector::iterator i = colorPickers.begin(); i != colorPickers.end(); ++i) { + if (*i == hoveredPicker) { + colorPickers.erase(i); + delete hoveredPicker; + hoveredPicker = nullptr; + state = SDeletePicker; + needRedraw = true; + break; + } + } + } + } + } } if (needRedraw) { @@ -506,6 +613,10 @@ void CropWindow::buttonRelease (int button, int num, int bstate, int x, int y) } needRedraw = true; + } else if (state == SCropWinMove) { + if (iarea->showColorPickers () && !colorPickers.empty()) { + needRedraw = true; + } } else if (state == SCropImgMove) { cropHandler.update (); @@ -602,6 +713,10 @@ void CropWindow::buttonRelease (int button, int num, int bstate, int x, int y) } else { iarea->object = 0; } + } else if (state == SDeletePicker) { + needRedraw = true; + } else if (state == SNormal && iarea->getToolMode() == TMColorPicker && !hoveredPicker && button == 3) { + iarea->setToolHand (); } if (cropgl && (state == SCropSelecting || state == SResizeH1 || state == SResizeH2 || state == SResizeW1 || state == SResizeW2 || state == SResizeTL || state == SResizeTR || state == SResizeBL || state == SResizeBR || state == SCropMove)) { @@ -615,12 +730,12 @@ void CropWindow::buttonRelease (int button, int num, int bstate, int x, int y) } if (deleted) { - iarea->flawnOverWindow = NULL; + iarea->flawnOverWindow = nullptr; delete this; return; } - if (state != SEditDrag3 && state != SEditPick3 && button == 3 && !(bstate & (GDK_SHIFT_MASK|GDK_CONTROL_MASK))) { + if (state != SDeletePicker && state != SEditDrag3 && state != SEditPick3 && button == 3 && !(bstate & (GDK_SHIFT_MASK|GDK_CONTROL_MASK))) { iarea->pipetteVal[0] = iarea->pipetteVal[1] = iarea->pipetteVal[2] = -1.f; needRedraw = iarea->object == 1; @@ -637,7 +752,7 @@ void CropWindow::buttonRelease (int button, int num, int bstate, int x, int y) } state = SNormal; - iarea->grabFocus (NULL); + iarea->grabFocus (nullptr); if (needRedraw) { iarea->redraw (); @@ -778,6 +893,26 @@ void CropWindow::pointerMoved (int bstate, int x, int y) action_x = new_action_x; action_y = new_action_y; iarea->redraw (); + } else if (state == SDragPicker) { + Coord imgPos; + action_x = x - press_x; + action_x = y - press_y; + screenCoordToImage (x, y, imgPos.x, imgPos.y); + if (imgPos.x < 0) { + imgPos.x = 0; + }else if (imgPos.x >= iarea->getImProcCoordinator()->getFullWidth()) { + imgPos.x = iarea->getImProcCoordinator()->getFullWidth()-1; + } + if (imgPos.y < 0) { + imgPos.y = 0; + }else if (imgPos.y >= iarea->getImProcCoordinator()->getFullHeight()) { + imgPos.y = iarea->getImProcCoordinator()->getFullHeight()-1; + } + updateHoveredPicker (&imgPos); + iarea->redraw (); + } else if (state == SNormal && iarea->getToolMode () == TMColorPicker && onArea(ColorPicker, x, y)) { + // TODO: we could set the hovered picker as Highlighted here + // Keep this if statement, the onArea will find out the hoveredPicker and will be used to update the cursor } else if (editSubscriber) { rtengine::Crop* crop = static_cast(cropHandler.getCrop()); @@ -931,6 +1066,16 @@ bool CropWindow::onArea (CursorArea a, int x, int y) case CropImage: return x >= xpos + imgX + imgAreaX && y >= ypos + imgY + imgAreaY && x < xpos + imgX + imgAreaX + imgW && y < ypos + imgY + imgAreaY + imgH; + case ColorPicker: + for (auto colorPicker : colorPickers) { + if (colorPicker->isOver(x, y)) { + hoveredPicker = colorPicker; + return true; + } + } + hoveredPicker = nullptr; + return false; + case CropBorder: return (x >= xpos + imgAreaX && y >= ypos + imgAreaY && x < xpos + imgAreaX + imgAreaW && y < ypos + imgAreaY + imgAreaH) && @@ -1048,6 +1193,8 @@ void CropWindow::updateCursor (int x, int y) cursorManager.setCursor (iarea->get_window(), CSMove); } else if (onArea (CropResize, x, y)) { cursorManager.setCursor (iarea->get_window(), CSResizeDiagonal); + } else if (tm == TMColorPicker && hoveredPicker) { + cursorManager.setCursor (iarea->get_window(), CSMove); } else if (tm == TMHand && (onArea (CropTopLeft, x, y))) { cursorManager.setCursor (iarea->get_window(), CSResizeTopLeft); } else if (tm == TMHand && (onArea (CropTopRight, x, y))) { @@ -1083,6 +1230,8 @@ void CropWindow::updateCursor (int x, int y) cursorManager.setCursor (iarea->get_window(), CSCropSelect); } else if (tm == TMStraighten) { cursorManager.setCursor (iarea->get_window(), CSStraighten); + } else if (tm == TMColorPicker) { + cursorManager.setCursor (iarea->get_window(), CSAddColPicker); } } else { int objectID = -1; @@ -1121,6 +1270,8 @@ void CropWindow::updateCursor (int x, int y) cursorManager.setCursor (iarea->get_window(), CSResizeBottomRight); } else if (state == SCropWinResize) { cursorManager.setCursor (iarea->get_window(), CSResizeDiagonal); + } else if (state == SDragPicker) { + cursorManager.setCursor (iarea->get_window(), CSMove2D); } } @@ -1128,6 +1279,8 @@ void CropWindow::expose (Cairo::RefPtr cr) { MyMutex::MyLock lock(cropHandler.cimg); + bool isPreviewImg = false; + if (decorated) { drawDecoration (cr); } @@ -1575,7 +1728,7 @@ void CropWindow::expose (Cairo::RefPtr cr) if (cropHandler.cropParams.enabled) { int cropX, cropY; cropHandler.getPosition (cropX, cropY); - drawCrop (cr, x + imgAreaX + imgX, y + imgAreaY + imgY, imgW, imgH, cropX, cropY, zoomSteps[cropZoom].zoom, cropHandler.cropParams, (this == iarea->mainCropWindow), true, zoomSteps[cropZoom].zoom <= cropHandler.getFitZoom() ); + drawCrop (cr, x + imgAreaX + imgX, y + imgAreaY + imgY, imgW, imgH, cropX, cropY, zoomSteps[cropZoom].zoom, cropHandler.cropParams, (this == iarea->mainCropWindow), true, cropHandler.isFullDisplay ()); } if (observedCropWin) { @@ -1640,6 +1793,8 @@ void CropWindow::expose (Cairo::RefPtr cr) } } + + isPreviewImg = true; } else { // cropHandler.cropPixbuf is null int cropX, cropY; @@ -1650,7 +1805,7 @@ void CropWindow::expose (Cairo::RefPtr cr) iarea->get_window()->draw_pixbuf (iarea->get_style()->get_base_gc(Gtk::STATE_NORMAL), rough, 0, 0, x + imgAreaX + imgX, y + imgAreaY + imgY, rtengine::min (rough->get_width (), imgAreaW-imgX), rtengine::min (rough->get_height (), imgAreaH-imgY), Gdk::RGB_DITHER_NORMAL, 0, 0); if (cropHandler.cropParams.enabled) { - drawCrop (cr, x + imgAreaX + imgX, y + imgAreaY + imgY, rough->get_width(), rough->get_height(), cropX, cropY, zoomSteps[cropZoom].zoom, cropHandler.cropParams, (this == iarea->mainCropWindow), true, zoomSteps[cropZoom].zoom <= cropHandler.getFitZoom()); + drawCrop (cr, x + imgAreaX + imgX, y + imgAreaY + imgY, rough->get_width(), rough->get_height(), cropX, cropY, zoomSteps[cropZoom].zoom, cropHandler.cropParams, (this == iarea->mainCropWindow), true, cropHandler.isFullDisplay ()); } if (observedCropWin) { @@ -1674,6 +1829,12 @@ void CropWindow::expose (Cairo::RefPtr cr) } } + if ((state == SNormal || state == SDragPicker) && isPreviewImg && iarea->showColorPickers()) { + for (auto colorPicker : colorPickers) { + colorPicker->draw(cr); + } + } + //t2.set (); // printf ("etime --> %d, %d\n", t2.etime (t1), t4.etime (t3)); } @@ -1888,10 +2049,10 @@ void CropWindow::buttonPressed (LWButton* button, int actionCode, void* actionDa } else if (button == bZoom100) { // zoom 100 zoom11 (); } else if (button == bClose) { // close - if(ipc->updateTryLock()) { + if(iarea->getImProcCoordinator()->updateTryLock()) { deleted = true; iarea->cropWindowClosed (this); - ipc->updateUnLock(); + iarea->getImProcCoordinator()->updateUnLock(); } } } @@ -1902,6 +2063,36 @@ void CropWindow::redrawNeeded (LWButton* button) iarea->redraw (); } +void CropWindow::updateHoveredPicker (rtengine::Coord *imgPos) +{ + + if (!hoveredPicker) { + return; + } + + rtengine::Coord cropPos; + float r=0.f, g=0.f, b=0.f; + float rpreview=0.f, gpreview=0.f, bpreview=0.f; + if (imgPos) { + imageCoordToCropImage(imgPos->x, imgPos->y, cropPos.x, cropPos.y); + hoveredPicker->setPosition (*imgPos); + } else { + rtengine::Coord imgPos2; + hoveredPicker->getImagePosition(imgPos2); + imageCoordToCropImage(imgPos2.x, imgPos2.y, cropPos.x, cropPos.y); + } + LockableColorPicker::Validity validity = checkValidity (hoveredPicker, cropPos); + hoveredPicker->setValidity (validity); + + { + MyMutex::MyLock lock(cropHandler.cimg); + + if (validity == LockableColorPicker::Validity::INSIDE) { + cropHandler.colorPick(cropPos, r, g, b, rpreview, gpreview, bpreview, hoveredPicker->getSize()); + hoveredPicker->setRGB (r, g, b, rpreview, gpreview, bpreview); + } + } +} void CropWindow::changeZoom (int zoom, bool notify, int centerx, int centery) { @@ -1924,6 +2115,43 @@ void CropWindow::changeZoom (int zoom, bool notify, int centerx, int centery) iarea->redraw (); } +LockableColorPicker::Validity CropWindow::checkValidity (LockableColorPicker* picker, const rtengine::Coord &pos) +{ + + if (!cropHandler.cropPixbuftrue) { + return LockableColorPicker::Validity::OUTSIDE; + } + rtengine::Coord cropTopLeft, cropBottomRight, cropSize; + int skip; + cropHandler.getWindow(cropTopLeft.x, cropTopLeft.y, cropSize.x, cropSize.y, skip); + cropBottomRight = cropTopLeft + cropSize; + rtengine::Coord pickerPos, cropPickerPos; + picker->getImagePosition(pickerPos); + rtengine::Coord minPos(0, 0); + rtengine::Coord maxPos(cropHandler.cropPixbuftrue->get_width(), cropHandler.cropPixbuftrue->get_height()); + rtengine::Coord halfPickerSize((int)picker->getSize()/2, (int)picker->getSize()/2); + imageCoordToCropImage (pickerPos.x, pickerPos.y, cropPickerPos.x, cropPickerPos.y); + imageCoordToCropImage (cropTopLeft.x, cropTopLeft.y, minPos.x, minPos.y); + imageCoordToCropImage (cropBottomRight.x, cropBottomRight.y, maxPos.x, maxPos.y); + rtengine::Coord pickerMinPos = cropPickerPos - halfPickerSize; + rtengine::Coord pickerMaxPos = cropPickerPos + halfPickerSize; + if (pickerMaxPos.x < minPos.x || pickerMaxPos.y < minPos.y || pickerMinPos.x > maxPos.x || pickerMinPos.y > maxPos.y) { + return LockableColorPicker::Validity::OUTSIDE; + } else if (pickerMinPos >= minPos && pickerMaxPos < maxPos) { + return LockableColorPicker::Validity::INSIDE; + } else { + return LockableColorPicker::Validity::CROSSING; + } +} + +void CropWindow::deleteColorPickers () +{ + for (auto colorPicker : colorPickers) { + delete colorPicker; + } + colorPickers.clear(); +} + void CropWindow::screenCoordToCropBuffer (int phyx, int phyy, int& cropx, int& cropy) { @@ -1945,8 +2173,8 @@ void CropWindow::screenCoordToImage (int phyx, int phyy, int& imgx, int& imgy) int cropX, cropY; cropHandler.getPosition (cropX, cropY); - imgx = cropX + (phyx - xpos - imgX) / zoomSteps[cropZoom].zoom; - imgy = cropY + (phyy - ypos - imgY) / zoomSteps[cropZoom].zoom; + imgx = cropX + (phyx - xpos - imgX - imgAreaX) / zoomSteps[cropZoom].zoom; + imgy = cropY + (phyy - ypos - imgY - imgAreaY) / zoomSteps[cropZoom].zoom; } void CropWindow::screenCoordToCropCanvas (int phyx, int phyy, int& prevx, int& prevy) @@ -1983,6 +2211,14 @@ void CropWindow::imageCoordToCropBuffer (int imgx, int imgy, int& phyx, int& phy phyy = (imgy - cropY) * zoomSteps[cropZoom].zoom + /*ypos + imgY +*/ crop->getUpperBorder(); } +void CropWindow::imageCoordToCropImage (int imgx, int imgy, int& phyx, int& phyy) +{ + int cropX, cropY; + cropHandler.getPosition (cropX, cropY); + phyx = (imgx - cropX) * zoomSteps[cropZoom].zoom; + phyy = (imgy - cropY) * zoomSteps[cropZoom].zoom; +} + int CropWindow::scaleValueToImage (int value) { return int(double(value) / zoomSteps[cropZoom].zoom); @@ -2219,7 +2455,18 @@ void CropWindow::drawObservedFrame (Cairo::RefPtr cr, int rw, in void CropWindow::cropImageUpdated () { + MyMutex::MyLock lock(cropHandler.cimg); + for (auto colorPicker : colorPickers) { + Coord imgPos, cropPos; + colorPicker->getImagePosition(imgPos); + imageCoordToCropImage(imgPos.x, imgPos.y, cropPos.x, cropPos.y); + float r=0.f, g=0.f, b=0.f; + float rpreview=0.f, gpreview=0.f, bpreview=0.f; + colorPicker->setValidity (checkValidity (colorPicker, cropPos)); + cropHandler.colorPick(cropPos, r, g, b, rpreview, gpreview, bpreview, colorPicker->getSize()); + colorPicker->setRGB (r, g, b, rpreview, gpreview, bpreview); + } iarea->redraw (); } @@ -2281,7 +2528,61 @@ void CropWindow::delCropWindowListener (CropWindowListener* l) } } -EditDataProvider* CropWindow::getImageArea() +ImageArea* CropWindow::getImageArea() { return iarea; } + +void CropWindow::setCropGUIListener (CropGUIListener* cgl) +{ + cropgl = cgl; +} + +void CropWindow::setPointerMotionListener (PointerMotionListener* pml) +{ + pmlistener = pml; + if (pml) { + pml->signal_cycle_rgb().connect( sigc::mem_fun(*this, &CropWindow::cycleRGB) ); + pml->signal_cycle_hsv().connect( sigc::mem_fun(*this, &CropWindow::cycleHSV) ); + } +} + +PointerMotionListener* CropWindow::getPointerMotionListener () +{ + return pmlistener; +} + +void CropWindow::setPointerMotionHListener (PointerMotionListener* pml) +{ + pmhlistener = pml; +} + +// crop window listeners +void CropWindow::addCropWindowListener (CropWindowListener* l) +{ + listeners.push_back (l); +} + +void CropWindow::cycleRGB () +{ + bool redraw = false; + for (auto colorPicker : colorPickers) { + redraw |= colorPicker->cycleRGB (); + } + + if (redraw) { + iarea->redraw (); + } +} + +void CropWindow::cycleHSV () +{ + bool redraw = false; + for (auto colorPicker : colorPickers) { + redraw |= colorPicker->cycleHSV (); + } + + if (redraw) { + iarea->redraw (); + } +} diff --git a/rtgui/cropwindow.h b/rtgui/cropwindow.h index d9f738f66..eec1b812a 100644 --- a/rtgui/cropwindow.h +++ b/rtgui/cropwindow.h @@ -59,6 +59,10 @@ class CropWindow : public LWButtonListener, public CropDisplayHandler, public Ed bool fitZoom; bool isLowUpdatePriority; + // color pickers + std::vector colorPickers; + LockableColorPicker* hoveredPicker; + // decoration LWButton *bZoomIn, *bZoomOut, *bZoom100, /**bZoomFit,*/ *bClose; LWButtonSet buttonSet; @@ -90,7 +94,6 @@ class CropWindow : public LWButtonListener, public CropDisplayHandler, public Ed std::list listeners; CropWindow* observedCropWin; // Pointer to the currently active detail CropWindow - rtengine::StagedImageProcessor* ipc; bool onArea (CursorArea a, int x, int y); void updateCursor (int x, int y); @@ -100,13 +103,19 @@ class CropWindow : public LWButtonListener, public CropDisplayHandler, public Ed void drawUnscaledSpotRectangle (Cairo::RefPtr cr, int rectSize); void drawObservedFrame (Cairo::RefPtr cr, int rw = 0, int rh = 0); void changeZoom (int zoom, bool notify = true, int centerx = -1, int centery = -1); + void updateHoveredPicker (rtengine::Coord *imgPos = nullptr); + void cycleRGB (); + void cycleHSV (); + + LockableColorPicker::Validity checkValidity (LockableColorPicker* picker, const rtengine::Coord &pos); // Used by the mainCropWindow only void getObservedFrameArea (int& x, int& y, int& w, int& h, int rw = 0, int rh = 0); public: CropHandler cropHandler; - CropWindow (ImageArea* parent, rtengine::StagedImageProcessor* ipc_, bool isLowUpdatePriority_, bool isDetailWindow); + CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDetailWindow); + ~CropWindow (); void setDecorated (bool decorated) { @@ -120,6 +129,7 @@ public: { observedCropWin = cw; } + void deleteColorPickers (); void screenCoordToCropBuffer (int phyx, int phyy, int& cropx, int& cropy); void screenCoordToImage (int phyx, int phyy, int& imgx, int& imgy); @@ -127,6 +137,7 @@ public: void imageCoordToCropCanvas (int imgx, int imgy, int& phyx, int& phyy); void imageCoordToScreen (int imgx, int imgy, int& phyx, int& phyy); void imageCoordToCropBuffer (int imgx, int imgy, int& phyx, int& phyy); + void imageCoordToCropImage (int imgx, int imgy, int& phyx, int& phyy); int scaleValueToImage (int value); float scaleValueToImage (float value); double scaleValueToImage (double value); @@ -157,6 +168,7 @@ public: bool isInside (int x, int y); + void scroll (int state, GdkScrollDirection direction, int x, int y); void buttonPress (int button, int num, int state, int x, int y); void buttonRelease (int button, int num, int state, int x, int y); void pointerMoved (int bstate, int x, int y); @@ -179,24 +191,13 @@ public: void setCropAnchorPosition (int& w, int& h); // listeners - void setCropGUIListener (CropGUIListener* cgl) - { - cropgl = cgl; - } - void setPointerMotionListener (PointerMotionListener* pml) - { - pmlistener = pml; - } - void setPointerMotionHListener (PointerMotionListener* pml) - { - pmhlistener = pml; - } + void setCropGUIListener (CropGUIListener* cgl); + void setPointerMotionListener (PointerMotionListener* pml); + PointerMotionListener* getPointerMotionListener (); + void setPointerMotionHListener (PointerMotionListener* pml); // crop window listeners - void addCropWindowListener (CropWindowListener* l) - { - listeners.push_back (l); - } + void addCropWindowListener (CropWindowListener* l); void delCropWindowListener (CropWindowListener* l); // crophandlerlistener interface @@ -208,7 +209,7 @@ public: void remoteMove (int deltaX, int deltaY); void remoteMoveReady (); - EditDataProvider* getImageArea(); + ImageArea* getImageArea(); }; #endif diff --git a/rtgui/cursormanager.cc b/rtgui/cursormanager.cc index e011fd969..78e2513a5 100644 --- a/rtgui/cursormanager.cc +++ b/rtgui/cursormanager.cc @@ -44,6 +44,7 @@ void CursorManager::init (Glib::RefPtr mainWin) Glib::RefPtr hand = RTImage::createFromFile ("cross.png"); Glib::RefPtr close_hand = RTImage::createFromFile ("closedhand.png"); Glib::RefPtr wbpick = RTImage::createFromFile ("gtk-color-picker-small.png"); + Glib::RefPtr cpick = RTImage::createFromFile ("gtk-color-picker-add.png"); Glib::RefPtr empty = RTImage::createFromFile ("empty.png"); Glib::RefPtr move2D = RTImage::createFromFile ("move-2D.png"); Glib::RefPtr move1DH = RTImage::createFromFile ("move-1D-h.png"); @@ -52,7 +53,8 @@ void CursorManager::init (Glib::RefPtr mainWin) cHand = hand ? new Gdk::Cursor (cAdd->get_display(), hand, 10, 10) : new Gdk::Cursor (Gdk::HAND2); cClosedHand = close_hand ? new Gdk::Cursor (cAdd->get_display(), close_hand, 10, 10) : new Gdk::Cursor (Gdk::HAND2); - cWB = wbpick ? new Gdk::Cursor (cAdd->get_display(), wbpick, 1, 12) : new Gdk::Cursor (Gdk::ARROW); + cWB = wbpick ? new Gdk::Cursor (cAdd->get_display(), wbpick, 3, 15) : new Gdk::Cursor (Gdk::ARROW); + cAddPicker = cpick ? new Gdk::Cursor (cAdd->get_display(), cpick, 3, 18) : new Gdk::Cursor (Gdk::ARROW); cHidden = empty ? new Gdk::Cursor (cAdd->get_display(), empty, 12, 12) : new Gdk::Cursor (Gdk::FLEUR); cMove2D = move2D ? new Gdk::Cursor (cAdd->get_display(), move2D, 11, 11) : new Gdk::Cursor (Gdk::FLEUR); cMove1DH = move1DH ? new Gdk::Cursor (cAdd->get_display(), move1DH, 11, 11) : new Gdk::Cursor (Gdk::FLEUR); @@ -100,6 +102,8 @@ void CursorManager::setCursor (Glib::RefPtr window, CursorShape sha window->set_cursor (*cMoveRotate); } else if (shape == CSSpotWB) { window->set_cursor (*cWB); + } else if (shape == CSAddColPicker) { + window->set_cursor (*cAddPicker); } else if (shape == CSCropSelect) { window->set_cursor (*cHand); } else if (shape == CSMoveLeft) { diff --git a/rtgui/cursormanager.h b/rtgui/cursormanager.h index b51fb1e38..f256415c1 100644 --- a/rtgui/cursormanager.h +++ b/rtgui/cursormanager.h @@ -26,7 +26,7 @@ enum CursorShape { CSMoveRight, CSResizeWidth, CSResizeHeight, CSResizeDiagonal, CSResizeTopLeft, CSResizeTopRight, CSResizeBottomLeft, CSResizeBottomRight, CSMove2D, CSMove1DH, CSMove1DV, CSMoveRotate, - CSSpotWB, CSCropSelect, CSStraighten, CSPlus, CSWait, CSEmpty + CSSpotWB, CSAddColPicker, CSCropSelect, CSStraighten, CSPlus, CSWait, CSEmpty }; class CursorManager @@ -51,6 +51,7 @@ protected: Gdk::Cursor* cHand; Gdk::Cursor* cClosedHand; Gdk::Cursor* cWB; + Gdk::Cursor* cAddPicker; Gdk::Cursor* cHidden; Gdk::Cursor* cMove2D; Gdk::Cursor* cMove1DH; diff --git a/rtgui/curveeditor.cc b/rtgui/curveeditor.cc index c9d02d9a3..117051b2a 100644 --- a/rtgui/curveeditor.cc +++ b/rtgui/curveeditor.cc @@ -196,10 +196,11 @@ CurveEditor::CurveEditor (Glib::ustring text, CurveEditorGroup* ceGroup, CurveEd bgHistValid = false; remoteDrag = false; selected = DCT_Linear; - bottomBarCP = NULL; - leftBarCP = NULL; - curveCP = NULL; - relatedWidget = NULL; + bottomBarCP = nullptr; + leftBarCP = nullptr; + curveCP = nullptr; + relatedWidget = nullptr; + expandRelatedWidget = true; group = ceGroup; subGroup = ceSubGroup; diff --git a/rtgui/curveeditor.h b/rtgui/curveeditor.h index a3ba68436..3f279ff05 100644 --- a/rtgui/curveeditor.h +++ b/rtgui/curveeditor.h @@ -66,6 +66,7 @@ protected: CurveEditorGroup* group; CurveEditorSubGroup* subGroup; Gtk::Widget* relatedWidget; + bool expandRelatedWidget; std::vector tempCurve; sigc::connection typeconn; diff --git a/rtgui/curveeditorgroup.cc b/rtgui/curveeditorgroup.cc index f703169ed..aad30ac37 100644 --- a/rtgui/curveeditorgroup.cc +++ b/rtgui/curveeditorgroup.cc @@ -26,8 +26,8 @@ #include "multilangmgr.h" #include "rtimage.h" -CurveEditorGroup::CurveEditorGroup (Glib::ustring& curveDir, Glib::ustring groupLabel) : curveDir(curveDir), curve_reset(NULL), - displayedCurve(0), flatSubGroup(0), diagonalSubGroup(0), cl(NULL), numberOfPackedCurve(0) +CurveEditorGroup::CurveEditorGroup (Glib::ustring& curveDir, Glib::ustring groupLabel) : curveDir(curveDir), curve_reset(nullptr), + displayedCurve(nullptr), flatSubGroup(nullptr), diagonalSubGroup(nullptr), cl(nullptr), numberOfPackedCurve(0) { // We set the label to the one provided as parameter, even if it's an empty string @@ -73,7 +73,7 @@ void CurveEditorGroup::hideCurrentCurve() * periodic: for FlatCurve only, ask the curve to be periodic (default: True) * */ -CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget, bool periodic) +CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget, bool expandRelatedWidget, bool periodic) { switch (cType) { case (CT_Diagonal): { @@ -84,6 +84,7 @@ CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabe // We add it to the curve editor list DiagonalCurveEditor* newCE = diagonalSubGroup->addCurve(curveLabel); newCE->relatedWidget = relatedWidget; + newCE->expandRelatedWidget = expandRelatedWidget; curveEditors.push_back(newCE); return (newCE); } @@ -96,16 +97,17 @@ CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabe // We add it to the curve editor list FlatCurveEditor* newCE = flatSubGroup->addCurve(curveLabel, periodic); newCE->relatedWidget = relatedWidget; + newCE->expandRelatedWidget = expandRelatedWidget; curveEditors.push_back(newCE); return (newCE); } default: - return (static_cast(NULL)); + return (static_cast(nullptr)); break; } - return NULL; // to avoid complains from Gcc + return nullptr; // to avoid complains from Gcc } /* @@ -113,10 +115,9 @@ CurveEditor* CurveEditorGroup::addCurve(CurveType cType, Glib::ustring curveLabe */ void CurveEditorGroup::newLine() { - Gtk::HBox* headerBox; if (curveEditors.size() > numberOfPackedCurve) { - headerBox = Gtk::manage (new Gtk::HBox ()); + Gtk::HBox* headerBox = Gtk::manage (new Gtk::HBox ()); if (!numberOfPackedCurve) { headerBox->pack_start(*curveGroupLabel, Gtk::PACK_SHRINK, 2); @@ -132,20 +133,21 @@ void CurveEditorGroup::newLine() } int j = numberOfPackedCurve; - bool hasRelatedWidget = false; + + bool rwe = false; for (int i = (int)(curveEditors.size()) - 1; i >= j; i--) { - if (curveEditors[i]->relatedWidget != NULL) { - hasRelatedWidget = true; + if (curveEditors[i]->relatedWidget != nullptr && curveEditors[i]->expandRelatedWidget) { + rwe = true; } } for (int i = (int)(curveEditors.size()) - 1; i >= j; i--) { - if (curveEditors[i]->relatedWidget != NULL) { - headerBox->pack_end (*curveEditors[i]->relatedWidget, Gtk::PACK_EXPAND_WIDGET, 2); + if (curveEditors[i]->relatedWidget != nullptr) { + headerBox->pack_end (*curveEditors[i]->relatedWidget, curveEditors[i]->expandRelatedWidget ? Gtk::PACK_EXPAND_WIDGET : Gtk::PACK_SHRINK, 2); } - headerBox->pack_end (*curveEditors[i]->curveType->buttonGroup, hasRelatedWidget ? Gtk::PACK_SHRINK : Gtk::PACK_EXPAND_WIDGET, 2); + headerBox->pack_end (*curveEditors[i]->curveType->buttonGroup, rwe ? Gtk::PACK_SHRINK : Gtk::PACK_EXPAND_WIDGET, 2); numberOfPackedCurve++; } @@ -258,7 +260,7 @@ void CurveEditorGroup::curveTypeToggled(CurveEditor* ce) } } else { // The button is now released, so we have to hide this CurveEditor - displayedCurve = 0; + displayedCurve = nullptr; } ce->subGroup->switchGUI(); @@ -356,7 +358,7 @@ void CurveEditorGroup::setTooltip( Glib::ustring ttip) void CurveEditorGroup::setBatchMode (bool batchMode) { for (std::vector::iterator i = curveEditors.begin(); i != curveEditors.end(); ++i) { - (*i)->curveType->addEntry("curveType-unchanged.png", M("GENERAL_UNCHANGED")); + (*i)->curveType->addEntry("unchanged-18.png", M("GENERAL_UNCHANGED")); (*i)->curveType->show(); } } @@ -381,10 +383,10 @@ void CurveEditorGroup::setUnChanged (bool uc, CurveEditor* ce) } } -CurveEditorSubGroup::CurveEditorSubGroup(Glib::ustring& curveDir) : curveDir(curveDir), lastFilename("") +CurveEditorSubGroup::CurveEditorSubGroup(Glib::ustring& curveDir) : curveDir(curveDir), lastFilename(""), valLinear(0), valUnchanged(0), parent(nullptr), curveBBoxPos(0) { - leftBar = NULL; - bottomBar = NULL; + leftBar = nullptr; + bottomBar = nullptr; } CurveEditorSubGroup::~CurveEditorSubGroup() diff --git a/rtgui/curveeditorgroup.h b/rtgui/curveeditorgroup.h index 09cbb8167..097bfd3e3 100644 --- a/rtgui/curveeditorgroup.h +++ b/rtgui/curveeditorgroup.h @@ -85,7 +85,7 @@ public: return displayedCurve; } //void on_realize (); - CurveEditor* addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget = NULL, bool periodic = true); + CurveEditor* addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget = nullptr, bool expandRelatedWidget = true, bool periodic = true); protected: //void curveTypeToggled (); @@ -154,7 +154,7 @@ protected: * This variable will be updated with actions in the * dialogs. */ - CurveEditorSubGroup(Glib::ustring& curveDir); + explicit CurveEditorSubGroup(Glib::ustring& curveDir); Glib::ustring outputFile (); Glib::ustring inputFile (); diff --git a/rtgui/darkframe.h b/rtgui/darkframe.h index fd0dc9fde..0660c953d 100644 --- a/rtgui/darkframe.h +++ b/rtgui/darkframe.h @@ -55,8 +55,8 @@ public: DarkFrame (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void darkFrameChanged (); void darkFrameReset (); diff --git a/rtgui/defringe.cc b/rtgui/defringe.cc index 5da21185c..8d7287ac1 100644 --- a/rtgui/defringe.cc +++ b/rtgui/defringe.cc @@ -35,8 +35,6 @@ Defringe::Defringe () : FoldableToolPanel(this, "defringe", M("TP_DEFRINGE_LABEL bottomMilestones.push_back( GradientMilestone(double(x), double(R), double(G), double(B)) ); } - setEnabledTooltipMarkup(M("TP_SHARPENING_TOOLTIP")); - curveEditorPF = new CurveEditorGroup (options.lastPFCurvesDir); curveEditorPF->setCurveListener (this); chshape = static_cast(curveEditorPF->addCurve(CT_Flat, M("TP_PFCURVE_CURVEEDITOR_CH"))); diff --git a/rtgui/defringe.h b/rtgui/defringe.h index 1d076ed4b..ef0bfd2aa 100644 --- a/rtgui/defringe.h +++ b/rtgui/defringe.h @@ -42,9 +42,9 @@ public: Defringe (); ~Defringe (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void autoOpenCurve (); void curveChanged (); diff --git a/rtgui/diagonalcurveeditorsubgroup.cc b/rtgui/diagonalcurveeditorsubgroup.cc index 657186a12..e3e83e153 100644 --- a/rtgui/diagonalcurveeditorsubgroup.cc +++ b/rtgui/diagonalcurveeditorsubgroup.cc @@ -35,7 +35,7 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt, Glib::ustring& curveDir) : CurveEditorSubGroup(curveDir) { - editedAdjuster = NULL; + editedAdjuster = nullptr; editedAdjusterValue = 0; curveBBoxPos = options.curvebboxpos; @@ -370,7 +370,7 @@ void DiagonalCurveEditorSubGroup::editModeSwitchedOff () bool prevState; prevState = editCustomConn.block(true); editCustom->set_active(false); - customCurve->pipetteMouseOver(NULL, NULL, 0); + customCurve->pipetteMouseOver(nullptr, nullptr, 0); customCurve->setDirty(true); if (!prevState) { @@ -379,7 +379,7 @@ void DiagonalCurveEditorSubGroup::editModeSwitchedOff () prevState = editNURBSConn.block(true); editNURBS->set_active(false); - NURBSCurve->pipetteMouseOver(NULL, NULL, 0); + NURBSCurve->pipetteMouseOver(nullptr, nullptr, 0); NURBSCurve->setDirty(true); if (!prevState) { @@ -388,7 +388,7 @@ void DiagonalCurveEditorSubGroup::editModeSwitchedOff () prevState = editParamConn.block(true); editParam->set_active(false); - paramCurve->pipetteMouseOver(NULL, NULL, 0); + paramCurve->pipetteMouseOver(nullptr, nullptr, 0); paramCurve->setDirty(true); if (!prevState) { @@ -410,7 +410,7 @@ void DiagonalCurveEditorSubGroup::pipetteMouseOver(EditDataProvider *provider, i paramCurve->pipetteMouseOver(curveEditor, provider, modifierKey); paramCurve->setDirty(true); float pipetteVal = 0.f; - editedAdjuster = NULL; + editedAdjuster = nullptr; int n = 0; if (provider->pipetteVal[0] != -1.f) { @@ -508,7 +508,7 @@ void DiagonalCurveEditorSubGroup::pipetteButton1Released(EditDataProvider *provi break; case (DCT_Parametric): - editedAdjuster = NULL; + editedAdjuster = nullptr; break; case (DCT_NURBS): @@ -576,7 +576,7 @@ void DiagonalCurveEditorSubGroup::stopNumericalAdjustment() */ void DiagonalCurveEditorSubGroup::refresh(CurveEditor *curveToRefresh) { - if (curveToRefresh != NULL && curveToRefresh == static_cast(parent->displayedCurve)) { + if (curveToRefresh != nullptr && curveToRefresh == static_cast(parent->displayedCurve)) { switch((DiagonalCurveType)(curveToRefresh->curveType->getSelected())) { case (DCT_Spline): customCurve->refresh(); @@ -618,11 +618,11 @@ void DiagonalCurveEditorSubGroup::switchGUI() ColorProvider *barColorProvider = dCurve->getLeftBarColorProvider(); std::vector bgGradient = dCurve->getLeftBarBgGradient(); - if (barColorProvider == NULL && bgGradient.size() == 0) { + if (barColorProvider == nullptr && bgGradient.size() == 0) { // dCurve has no left colored bar, so we delete the object if (leftBar) { delete leftBar; - leftBar = NULL; + leftBar = nullptr; } } else { // dCurve ave a ColorProvider or a background gradient defined, so we create/update the object @@ -635,7 +635,7 @@ void DiagonalCurveEditorSubGroup::switchGUI() leftBar->setColorProvider(barColorProvider, dCurve->getLeftBarCallerId()); leftBar->setBgGradient (bgGradient); } else { - leftBar->setColorProvider(NULL, -1); + leftBar->setColorProvider(nullptr, -1); leftBar->setBgGradient (bgGradient); } } @@ -643,11 +643,11 @@ void DiagonalCurveEditorSubGroup::switchGUI() barColorProvider = dCurve->getBottomBarColorProvider(); bgGradient = dCurve->getBottomBarBgGradient(); - if (barColorProvider == NULL && bgGradient.size() == 0) { + if (barColorProvider == nullptr && bgGradient.size() == 0) { // dCurve has no bottom colored bar, so we delete the object if (bottomBar) { delete bottomBar; - bottomBar = NULL; + bottomBar = nullptr; } } else { // dCurve has a ColorProvider or a background gradient defined, so we create/update the object @@ -660,7 +660,7 @@ void DiagonalCurveEditorSubGroup::switchGUI() bottomBar->setColorProvider(barColorProvider, dCurve->getBottomBarCallerId()); bottomBar->setBgGradient (bgGradient); } else { - bottomBar->setColorProvider(NULL, -1); + bottomBar->setColorProvider(nullptr, -1); bottomBar->setBgGradient (bgGradient); } } @@ -700,7 +700,7 @@ void DiagonalCurveEditorSubGroup::switchGUI() shcSelector->setColorProvider(barColorProvider, dCurve->getBottomBarCallerId()); shcSelector->setBgGradient(bgGradient); shcSelector->setMargins( (leftBar ? MyCurve::getBarWidth() + CBAR_MARGIN : RADIUS), RADIUS ); - paramCurve->setColoredBar(leftBar, NULL); + paramCurve->setColoredBar(leftBar, nullptr); paramCurve->forceResize(); updateEditButton(dCurve, editParam, editParamConn); parent->pack_start (*paramCurveBox); @@ -1117,32 +1117,28 @@ bool DiagonalCurveEditorSubGroup::curveReset(CurveEditor *ce) case (DCT_NURBS) : // = Control cage NURBSCurve->reset (dce->NURBSResetCurve, dce->getIdentityValue()); return true; - break; case (DCT_Spline) : // = Custom customCurve->reset (dce->customResetCurve, dce->getIdentityValue()); return true; - break; case (DCT_Parametric) : { DiagonalCurveEditor* dCurve = static_cast(parent->displayedCurve); double mileStone[3]; dCurve->getRangeDefaultMilestones(mileStone[0], mileStone[1], mileStone[2]); - highlights->resetPressed(NULL); - lights->resetPressed(NULL); - darks->resetPressed(NULL); - shadows->resetPressed(NULL); + highlights->resetPressed(nullptr); + lights->resetPressed(nullptr); + darks->resetPressed(nullptr); + shadows->resetPressed(nullptr); shcSelector->setDefaults(mileStone[0], mileStone[1], mileStone[2]); shcSelector->reset(); paramCurve->reset (dce->paramResetCurve, dce->getIdentityValue()); return true; - break; } default: return false; - break; } return true; diff --git a/rtgui/dirbrowser.cc b/rtgui/dirbrowser.cc index 9eaf38587..8d220e452 100644 --- a/rtgui/dirbrowser.cc +++ b/rtgui/dirbrowser.cc @@ -436,7 +436,7 @@ Gtk::TreePath DirBrowser::expandToDir (const Glib::ustring& absDirPath) } count++; - dir = strtok(NULL, "/\\"); + dir = strtok(nullptr, "/\\"); } free(dcpy); diff --git a/rtgui/dirpyrdenoise.cc b/rtgui/dirpyrdenoise.cc index 5bff14ef2..3cee199f8 100644 --- a/rtgui/dirpyrdenoise.cc +++ b/rtgui/dirpyrdenoise.cc @@ -36,12 +36,9 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP nextred = 0.; nextblue = 0.; - setEnabledTooltipMarkup(M("TP_DIRPYRDENOISE_ENABLED_TOOLTIP")); - std::vector defaultCurve; Gtk::Frame* lumaFrame = Gtk::manage (new Gtk::Frame (M("TP_DIRPYRDENOISE_LUMAFR")) ); - lumaFrame->set_tooltip_text(M("TP_DIRPYRDENOISE_LUMAFR_TOOLTIP")); lumaFrame->set_border_width(0); lumaFrame->set_label_align(0.025, 0.5); @@ -67,7 +64,7 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP //curveEditorG = new CurveEditorGroup (options.lastLabCurvesDir); NoiscurveEditorG->setCurveListener (this); rtengine::DirPyrDenoiseParams::getDefaultNoisCurve(defaultCurve); - lshape = static_cast(NoiscurveEditorG->addCurve(CT_Flat, "", NULL, false)); + lshape = static_cast(NoiscurveEditorG->addCurve(CT_Flat, "", nullptr, false, false)); lshape->setIdentityValue(0.); lshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); @@ -157,7 +154,7 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP CCcurveEditorG = new CurveEditorGroup (options.lastDenoiseCurvesDir, M("TP_DIRPYRDENOISE_CCCURVE")); CCcurveEditorG->setCurveListener (this); rtengine::DirPyrDenoiseParams::getDefaultCCCurve(defaultCurve); - ccshape = static_cast(CCcurveEditorG->addCurve(CT_Flat, "", NULL, false)); + ccshape = static_cast(CCcurveEditorG->addCurve(CT_Flat, "", nullptr, false, false)); ccshape->setIdentityValue(0.); ccshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); @@ -200,7 +197,6 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP median = Gtk::manage (new Gtk::CheckButton (M("TP_DIRPYRDENOISE_MED") + ":")); median->set_active (true); - median->set_tooltip_text (M("TP_DIRPYRDENOISE_MED_TOOLTIP")); medianFrame->set_label_widget(*median); diff --git a/rtgui/dirpyrdenoise.h b/rtgui/dirpyrdenoise.h index 0a5a00e3f..e81bf263e 100644 --- a/rtgui/dirpyrdenoise.h +++ b/rtgui/dirpyrdenoise.h @@ -97,9 +97,9 @@ public: DirPyrDenoise (); ~DirPyrDenoise (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void curveChanged (CurveEditor* ce); void setEditProvider (EditDataProvider *provider); diff --git a/rtgui/dirpyrequalizer.cc b/rtgui/dirpyrequalizer.cc index 53b4805ff..262f0f448 100644 --- a/rtgui/dirpyrequalizer.cc +++ b/rtgui/dirpyrequalizer.cc @@ -69,8 +69,6 @@ DirPyrEqualizer::DirPyrEqualizer () : FoldableToolPanel(this, "dirpyrequalizer", cbVBox->pack_start(*cdbox); pack_start(*cbVBox); - setEnabledTooltipMarkup(M("TP_SHARPENING_TOOLTIP")); - Gtk::HBox * buttonBox1 = Gtk::manage (new Gtk::HBox(true, 10)); pack_start(*buttonBox1); diff --git a/rtgui/dirpyrequalizer.h b/rtgui/dirpyrequalizer.h index d30e4d307..9a3517166 100644 --- a/rtgui/dirpyrequalizer.h +++ b/rtgui/dirpyrequalizer.h @@ -57,9 +57,9 @@ public: DirPyrEqualizer (); virtual ~DirPyrEqualizer (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void setAdjusterBehavior (bool multiplieradd, bool thresholdadd, bool skinadd); void trimValues (rtengine::procparams::ProcParams* pp); diff --git a/rtgui/distortion.cc b/rtgui/distortion.cc index d63868e85..91ad00ae9 100644 --- a/rtgui/distortion.cc +++ b/rtgui/distortion.cc @@ -26,7 +26,7 @@ using namespace rtengine::procparams; Distortion::Distortion (): FoldableToolPanel(this, "distortion", M("TP_DISTORTION_LABEL")) { - rlistener = NULL; + rlistener = nullptr; autoDistor = Gtk::manage (new Gtk::Button (M("TP_DISTORTION_AUTO"))); autoDistor->set_image (*Gtk::manage (new RTImage ("distortion-auto.png"))); autoDistor->set_tooltip_text (M("TP_DISTORTION_AUTO_TIP")); diff --git a/rtgui/distortion.h b/rtgui/distortion.h index 304f9dcd7..c2856323d 100644 --- a/rtgui/distortion.h +++ b/rtgui/distortion.h @@ -37,9 +37,9 @@ public: Distortion (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/edit.cc b/rtgui/edit.cc index 95831db7a..58d856bb5 100644 --- a/rtgui/edit.cc +++ b/rtgui/edit.cc @@ -20,7 +20,7 @@ #include "edit.h" #include "rtimage.h" -ObjectMOBuffer::ObjectMOBuffer(EditDataProvider *dataProvider) : objectMap(NULL), objectMode(OM_255), dataProvider(dataProvider) {} +ObjectMOBuffer::ObjectMOBuffer(EditDataProvider *dataProvider) : objectMap(nullptr), objectMode(OM_255), dataProvider(dataProvider) {} ObjectMOBuffer::~ObjectMOBuffer() { @@ -69,7 +69,7 @@ EditSubscriber *ObjectMOBuffer::getEditSubscriber () { if (dataProvider) { return dataProvider->getCurrSubscriber(); } else { - return NULL; + return nullptr; } } @@ -1035,7 +1035,7 @@ void OPIcon::drawToMOChannel(Cairo::RefPtr &cr, unsigned short i } } -EditSubscriber::EditSubscriber (EditType editType) : ID(EUID_None), editingType(editType), bufferType(BT_SINGLEPLANE_FLOAT), provider(NULL), action(ES_ACTION_NONE) {} +EditSubscriber::EditSubscriber (EditType editType) : ID(EUID_None), editingType(editType), bufferType(BT_SINGLEPLANE_FLOAT), provider(nullptr), action(ES_ACTION_NONE) {} void EditSubscriber::setEditProvider(EditDataProvider *provider) { @@ -1107,7 +1107,7 @@ bool EditSubscriber::isPicking() //-------------------------------------------------------------------------------------------------- -EditDataProvider::EditDataProvider() : currSubscriber(NULL), object(0), posScreen(-1, -1), posImage(-1, -1), +EditDataProvider::EditDataProvider() : currSubscriber(nullptr), object(0), posScreen(-1, -1), posImage(-1, -1), deltaScreen(0, 0), deltaImage(0, 0), deltaPrevScreen(0, 0), deltaPrevImage(0, 0) { pipetteVal[0] = pipetteVal[1] = pipetteVal[2] = 0.f; @@ -1124,7 +1124,7 @@ void EditDataProvider::subscribe(EditSubscriber *subscriber) void EditDataProvider::unsubscribe() { - currSubscriber = NULL; + currSubscriber = nullptr; } void EditDataProvider::switchOffEditMode() diff --git a/rtgui/edit.h b/rtgui/edit.h index c49c45408..e28a6acec 100644 --- a/rtgui/edit.h +++ b/rtgui/edit.h @@ -208,10 +208,12 @@ public: virtual void screenCoordToImage (int phyx, int phyy, int& imgx, int& imgy) = 0; /// Convert the image coords to the widget's DrawingArea (i.e. preview area) coords virtual void imageCoordToScreen (int imgx, int imgy, int& phyx, int& phyy) = 0; - /// Convert the image coords to the crop's canvas coords + /// Convert the image coords to the crop's canvas coords (full image + padding) virtual void imageCoordToCropCanvas (int imgx, int imgy, int& phyx, int& phyy) = 0; - /// Convert the image coords to the edit buffer coords + /// Convert the image coords to the edit buffer coords (includes borders) virtual void imageCoordToCropBuffer (int imgx, int imgy, int& phyx, int& phyy) = 0; + /// Convert the image coords to the displayed image coords (no borders here) + virtual void imageCoordToCropImage (int imgx, int imgy, int& phyx, int& phyy) = 0; /// Convert a size value from the preview's scale to the image's scale virtual int scaleValueToImage (int value) = 0; /// Convert a size value from the preview's scale to the image's scale @@ -463,7 +465,7 @@ protected: } action; /// object mode only, ignored in Pipette mode public: - EditSubscriber (EditType editType); + explicit EditSubscriber (EditType editType); virtual ~EditSubscriber () {} void setEditProvider(EditDataProvider *provider); diff --git a/rtgui/editenums.h b/rtgui/editenums.h index 557912222..264576789 100644 --- a/rtgui/editenums.h +++ b/rtgui/editenums.h @@ -21,9 +21,9 @@ enum ImgEditState {SNormal, SCropMove, SHandMove, SResizeW1, SResizeW2, SResizeH1, SResizeH2, SResizeTL, SResizeTR, SResizeBL, SResizeBR, SCropSelecting, SRotateSelecting, SCropWinMove, SCropFrameMove, SCropImgMove, SCropWinResize, SObservedMove, - SEditDrag1, SEditDrag2, SEditDrag3, SEditPick1, SEditPick2, SEditPick3 + SEditDrag1, SEditDrag2, SEditDrag3, SEditPick1, SEditPick2, SEditPick3, SDragPicker, SDeletePicker }; -enum CursorArea {CropWinButtons, CropToolBar, CropImage, CropBorder, CropTop, CropTopLeft, CropTopRight, CropBottom, CropBottomLeft, +enum CursorArea {CropWinButtons, CropToolBar, CropImage, ColorPicker, CropBorder, CropTop, CropTopLeft, CropTopRight, CropBottom, CropBottomLeft, CropBottomRight, CropLeft, CropRight, CropInside, CropResize, CropObserved }; diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 93a20c294..4ba581ddd 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -35,11 +35,13 @@ using namespace rtengine::procparams; -class EditorPanel::MonitorProfileSelector +class EditorPanel::ColorManagementToolbar { private: MyComboBoxText profileBox; PopUpButton intentBox; + Gtk::ToggleButton softProof; + Gtk::ToggleButton spGamutCheck; sigc::connection profileConn, intentConn; rtengine::StagedImageProcessor* const& processor; @@ -57,27 +59,49 @@ private: profileBox.set_active (0); #endif - const std::vector profiles = rtengine::iccStore->getProfiles (); + const std::vector profiles = rtengine::iccStore->getProfiles (true); for (std::vector::const_iterator iterator = profiles.begin (); iterator != profiles.end (); ++iterator) { profileBox.append_text (*iterator); } + profileBox.set_tooltip_text (profileBox.get_active_text ()); } void prepareIntentBox () { - intentBox.addEntry("intent-relative.png", M("PREFERENCES_INTENT_RELATIVE")); + // same order as the enum intentBox.addEntry("intent-perceptual.png", M("PREFERENCES_INTENT_PERCEPTUAL")); + intentBox.addEntry("intent-relative.png", M("PREFERENCES_INTENT_RELATIVE")); intentBox.addEntry("intent-absolute.png", M("PREFERENCES_INTENT_ABSOLUTE")); - intentBox.setSelected(0); + intentBox.setSelected(1); intentBox.show (); } + void prepareSoftProofingBox () + { + Gtk::Image *softProofImage = Gtk::manage (new RTImage ("softProof.png")); + softProofImage->set_padding(0, 0); + softProof.add(*softProofImage); + softProof.set_relief(Gtk::RELIEF_NONE); + softProof.set_tooltip_markup(M("SOFTPROOF_TOOLTIP")); + + softProof.set_active(false); + softProof.show (); + + Gtk::Image *spGamutCheckImage = Gtk::manage (new RTImage ("spGamutCheck.png")); + spGamutCheckImage->set_padding(0, 0); + spGamutCheck.add(*spGamutCheckImage); + spGamutCheck.set_relief(Gtk::RELIEF_NONE); + spGamutCheck.set_tooltip_markup(M("SOFTPROOF_GAMUTCHECK_TOOLTIP")); + + spGamutCheck.set_active(false); + spGamutCheck.set_sensitive(false); + spGamutCheck.show (); + } + void profileBoxChanged () { updateParameters (); - - profileBox.set_tooltip_text (profileBox.get_active_text ()); } void intentBoxChanged (int) @@ -85,7 +109,17 @@ private: updateParameters (); } - void updateParameters () + void softProofToggled () + { + updateSoftProofParameters (); + } + + void spGamutCheckToggled () + { + updateSoftProofParameters (); + } + + void updateParameters (bool noEvent = false) { ConnectionBlocker profileBlocker (profileConn); ConnectionBlocker intentBlocker (intentConn); @@ -113,33 +147,46 @@ private: profile.clear(); intentBox.set_sensitive (false); - intentBox.setSelected (0); + intentBox.setSelected (1); + softProof.set_sensitive(false); + spGamutCheck.set_sensitive(false); + + profileBox.set_tooltip_text (""); } else { - const std::uint8_t supportedIntents = rtengine::iccStore->getProofIntents (profile); + const uint8_t supportedIntents = rtengine::iccStore->getProofIntents (profile); const bool supportsRelativeColorimetric = supportedIntents & 1 << INTENT_RELATIVE_COLORIMETRIC; const bool supportsPerceptual = supportedIntents & 1 << INTENT_PERCEPTUAL; const bool supportsAbsoluteColorimetric = supportedIntents & 1 << INTENT_ABSOLUTE_COLORIMETRIC; if (supportsPerceptual || supportsRelativeColorimetric || supportsAbsoluteColorimetric) { intentBox.set_sensitive (true); - intentBox.setItemSensitivity(0, supportsRelativeColorimetric); - intentBox.setItemSensitivity(1, supportsPerceptual); + intentBox.setItemSensitivity(0, supportsPerceptual); + intentBox.setItemSensitivity(1, supportsRelativeColorimetric); intentBox.setItemSensitivity(2, supportsAbsoluteColorimetric); + softProof.set_sensitive(true); + spGamutCheck.set_sensitive(true); } else { + intentBox.setItemSensitivity(0, true); + intentBox.setItemSensitivity(1, true); + intentBox.setItemSensitivity(2, true); intentBox.set_sensitive (false); - intentBox.setSelected (0); + intentBox.setSelected (1); + softProof.set_sensitive(false); + spGamutCheck.set_sensitive(false); } + + profileBox.set_tooltip_text (profileBox.get_active_text ()); } rtengine::RenderingIntent intent; switch (intentBox.getSelected ()) { default: case 0: - intent = rtengine::RI_RELATIVE; + intent = rtengine::RI_PERCEPTUAL; break; case 1: - intent = rtengine::RI_PERCEPTUAL; + intent = rtengine::RI_RELATIVE; break; case 2: intent = rtengine::RI_ABSOLUTE; @@ -150,31 +197,63 @@ private: return; } - processor->beginUpdateParams (); + if (!noEvent) { + processor->beginUpdateParams (); + } processor->setMonitorProfile (profile, intent); - processor->endUpdateParams (rtengine::EvMonitorTransform); + processor->setSoftProofing (softProof.get_sensitive() && softProof.get_active(), spGamutCheck.get_sensitive() && spGamutCheck.get_active()); + if (!noEvent) { + processor->endUpdateParams (rtengine::EvMonitorTransform); + } + } + + void updateSoftProofParameters (bool noEvent = false) + { + spGamutCheck.set_sensitive(softProof.get_active()); + + if (profileBox.get_active_row_number () > 0) { + if (!noEvent) { + processor->beginUpdateParams (); + } + processor->setSoftProofing (softProof.get_sensitive() && softProof.get_active(), spGamutCheck.get_sensitive() && spGamutCheck.get_active()); + if (!noEvent) { + processor->endUpdateParams (rtengine::EvMonitorTransform); + } + } } public: - MonitorProfileSelector (rtengine::StagedImageProcessor* const& ipc) : + explicit ColorManagementToolbar (rtengine::StagedImageProcessor* const& ipc) : intentBox (Glib::ustring (), true), processor (ipc) { prepareProfileBox (); prepareIntentBox (); + prepareSoftProofingBox (); reset (); - profileConn = profileBox.signal_changed ().connect (sigc::mem_fun (this, &MonitorProfileSelector::profileBoxChanged)); - intentConn = intentBox.signal_changed ().connect (sigc::mem_fun (this, &MonitorProfileSelector::intentBoxChanged)); + softProof.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::softProofToggled)); + spGamutCheck.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::spGamutCheckToggled));; + profileConn = profileBox.signal_changed ().connect (sigc::mem_fun (this, &ColorManagementToolbar::profileBoxChanged)); + intentConn = intentBox.signal_changed ().connect (sigc::mem_fun (this, &ColorManagementToolbar::intentBoxChanged)); } void pack_end_in (Gtk::Box* box) { + box->pack_end (spGamutCheck, Gtk::PACK_SHRINK, 0); + box->pack_end (softProof, Gtk::PACK_SHRINK, 0); box->pack_end (*intentBox.buttonGroup, Gtk::PACK_SHRINK, 0); box->pack_end (profileBox, Gtk::PACK_SHRINK, 0); } + void updateProcessor() + { + if (processor) { + updateParameters(true); + } + } + void reset () { ConnectionBlocker profileBlocker (profileConn); @@ -193,10 +272,10 @@ public: switch (options.rtSettings.monitorIntent) { default: - case rtengine::RI_RELATIVE: + case rtengine::RI_PERCEPTUAL: intentBox.setSelected (0); break; - case rtengine::RI_PERCEPTUAL: + case rtengine::RI_RELATIVE: intentBox.setSelected (1); break; case rtengine::RI_ABSOLUTE: @@ -210,7 +289,7 @@ public: }; EditorPanel::EditorPanel (FilePanel* filePanel) - : realized(false), iHistoryShow(NULL), iHistoryHide(NULL), iTopPanel_1_Show(NULL), iTopPanel_1_Hide(NULL), iRightPanel_1_Show(NULL), iRightPanel_1_Hide(NULL), iBeforeLockON(NULL), iBeforeLockOFF(NULL), beforePreviewHandler(NULL), beforeIarea(NULL), beforeBox(NULL), afterBox(NULL), afterHeaderBox(NULL), parent(NULL), openThm(NULL), ipc(NULL), beforeIpc(NULL), isProcessing(false), catalogPane(NULL) + : realized(false), iHistoryShow(nullptr), iHistoryHide(nullptr), iTopPanel_1_Show(nullptr), iTopPanel_1_Hide(nullptr), iRightPanel_1_Show(nullptr), iRightPanel_1_Hide(nullptr), iBeforeLockON(nullptr), iBeforeLockOFF(nullptr), beforePreviewHandler(nullptr), beforeIarea(nullptr), beforeBox(nullptr), afterBox(nullptr), afterHeaderBox(nullptr), parent(nullptr), openThm(nullptr), ipc(nullptr), beforeIpc(nullptr), isProcessing(false), catalogPane(nullptr) { epih = new EditorPanelIdleHelper; @@ -231,7 +310,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) leftbox->set_border_width (2); leftbox->set_size_request(100, 250); - histogramPanel = NULL; + histogramPanel = nullptr; profilep = Gtk::manage (new ProfilePanel ()); ppframe = new Gtk::Frame (); @@ -286,7 +365,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) hidehp->set_image (*iHistoryShow); } - tbTopPanel_1 = NULL; + tbTopPanel_1 = nullptr; if (!simpleEditor && filePanel) { tbTopPanel_1 = new Gtk::ToggleButton (); @@ -313,6 +392,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) iareapanel = new ImageAreaPanel (); tpc->setEditProvider(iareapanel->imageArea); + tpc->getToolBar()->setLockablePickerToolListener(iareapanel->imageArea); Gtk::HBox* toolBarPanel = Gtk::manage (new Gtk::HBox ()); toolBarPanel->pack_start (*hidehp, Gtk::PACK_SHRINK, 1); @@ -410,7 +490,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) iops->pack_end (*iareapanel->imageArea->zoomPanel, Gtk::PACK_SHRINK, 1); iops->pack_end (*vsepz3, Gtk::PACK_SHRINK, 2); - navPrev = navNext = navSync = NULL; + navPrev = navNext = navSync = nullptr; if (!simpleEditor && !options.tabbedUI) { // Navigation buttons @@ -443,9 +523,9 @@ EditorPanel::EditorPanel (FilePanel* filePanel) iops->pack_end (*Gtk::manage(new Gtk::VSeparator()), Gtk::PACK_SHRINK, 0); - // Monitor profile buttons - monitorProfile.reset (new MonitorProfileSelector (ipc)); - monitorProfile->pack_end_in (iops); + // Color management toolbar + colorMgmtToolBar.reset (new ColorManagementToolbar (ipc)); + colorMgmtToolBar->pack_end_in (iops); editbox->pack_start (*Gtk::manage(new Gtk::HSeparator()), Gtk::PACK_SHRINK, 0); editbox->pack_start (*iops, Gtk::PACK_SHRINK, 0); @@ -544,31 +624,31 @@ EditorPanel::EditorPanel (FilePanel* filePanel) EditorPanel::~EditorPanel () { - history->setHistoryBeforeLineListener (NULL); + history->setHistoryBeforeLineListener (nullptr); // the order is important! - iareapanel->setBeforeAfterViews (NULL, iareapanel); + iareapanel->setBeforeAfterViews (nullptr, iareapanel); delete iareapanel; - iareapanel = NULL; + iareapanel = nullptr; if (beforeIpc) { beforeIpc->stopProcessing (); } delete beforeIarea; - beforeIarea = NULL; + beforeIarea = nullptr; if (beforeIpc) { - beforeIpc->setPreviewImageListener (NULL); + beforeIpc->setPreviewImageListener (nullptr); } delete beforePreviewHandler; - beforePreviewHandler = NULL; + beforePreviewHandler = nullptr; if (beforeIpc) { rtengine::StagedImageProcessor::destroy (beforeIpc); } - beforeIpc = NULL; + beforeIpc = nullptr; close (); @@ -705,6 +785,7 @@ void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc) this->isrc = isrc; ipc = rtengine::StagedImageProcessor::create (isrc); ipc->setProgressListener (this); + colorMgmtToolBar->updateProcessor(); ipc->setPreviewImageListener (previewHandler); ipc->setPreviewScale (10); // Important tpc->initImage (ipc, tmb->getType() == FT_Raw); @@ -753,8 +834,6 @@ void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc) } history->resetSnapShotNumber(); - - monitorProfile->reset (); } void EditorPanel::close () @@ -765,28 +844,28 @@ void EditorPanel::close () tpc->closeImage (); // this call stops image processing tpc->writeOptions (); rtengine::ImageSource* is = isrc->getImageSource(); - is->setProgressListener( NULL ); + is->setProgressListener( nullptr ); if (ipc) { - ipc->setPreviewImageListener (NULL); + ipc->setPreviewImageListener (nullptr); } if (beforeIpc) { - beforeIpc->setPreviewImageListener (NULL); + beforeIpc->setPreviewImageListener (nullptr); } delete previewHandler; - previewHandler = NULL; + previewHandler = nullptr; if(iareapanel) { - iareapanel->imageArea->setPreviewHandler (NULL); - iareapanel->imageArea->setImProcCoordinator (NULL); + iareapanel->imageArea->setPreviewHandler (nullptr); + iareapanel->imageArea->setImProcCoordinator (nullptr); iareapanel->imageArea->unsubscribe(); } rtengine::StagedImageProcessor::destroy (ipc); - ipc = NULL; - navigator->previewWindow->setPreviewHandler (NULL); + ipc = nullptr; + navigator->previewWindow->setPreviewHandler (nullptr); // If the file was deleted somewhere, the openThm.descreaseRef delete the object, but we don't know here if (Glib::file_test(fname, Glib::FILE_TEST_EXISTS)) { @@ -808,7 +887,7 @@ void EditorPanel::saveProfile () ipc->getParams (¶ms); // Will call updateCache, which will update both the cached and sidecar files if necessary - openThm->setProcParams (params, NULL, EDITOR); + openThm->setProcParams (params, nullptr, EDITOR); } } @@ -932,7 +1011,7 @@ void EditorPanel::refreshProcessingState (bool inProcessingP) if (inProcessingP) { if (processingStartedTime == 0) { - processingStartedTime = ::time(NULL); + processingStartedTime = ::time(nullptr); } s->str = "PROGRESSBAR_PROCESSING"; @@ -942,12 +1021,12 @@ void EditorPanel::refreshProcessingState (bool inProcessingP) if (ipc && openThm && tpc->getChangedState()) { rtengine::procparams::ProcParams pparams; ipc->getParams (&pparams); - openThm->setProcParams (pparams, NULL, EDITOR, false); + openThm->setProcParams (pparams, nullptr, EDITOR, false); } // Ring a sound if it was a long event if (processingStartedTime != 0) { - time_t curTime = ::time(NULL); + time_t curTime = ::time(nullptr); if (::difftime(curTime, processingStartedTime) > options.sndLngEditProcDoneSecs) { SoundManager::playSoundAsync(options.sndLngEditProcDone); @@ -984,7 +1063,7 @@ struct errparams { void EditorPanel::displayError (Glib::ustring title, Glib::ustring descr) { - GtkWidget* msgd = gtk_message_dialog_new_with_markup (NULL, + GtkWidget* msgd = gtk_message_dialog_new_with_markup (nullptr, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, @@ -1560,8 +1639,7 @@ void EditorPanel::saveAsPressed () fnameOut = saveAsDialog->getFileName (); options.lastSaveAsPath = saveAsDialog->getDirectory (); - options.saveAsDialogWidth = saveAsDialog->get_width (); - options.saveAsDialogHeight = saveAsDialog->get_height (); + saveAsDialog->get_size(options.saveAsDialogWidth, options.saveAsDialogHeight); options.autoSuffix = saveAsDialog->getAutoSuffix (); options.saveMethodNum = saveAsDialog->getSaveMethodNum (); lastSaveAsFileName = Glib::path_get_basename (removeExtension (fnameOut)); @@ -1630,6 +1708,8 @@ void EditorPanel::saveAsPressed () } while (!fnameOK); saveAsDialog->hide(); + + delete saveAsDialog; } void EditorPanel::queueImgPressed () @@ -1785,29 +1865,29 @@ void EditorPanel::beforeAfterToggled () beforeIpc->stopProcessing (); } - iareapanel->setBeforeAfterViews (NULL, iareapanel); - iareapanel->imageArea->iLinkedImageArea = NULL; + iareapanel->setBeforeAfterViews (nullptr, iareapanel); + iareapanel->imageArea->iLinkedImageArea = nullptr; delete beforeIarea; - beforeIarea = NULL; + beforeIarea = nullptr; if (beforeIpc) { - beforeIpc->setPreviewImageListener (NULL); + beforeIpc->setPreviewImageListener (nullptr); } delete beforePreviewHandler; - beforePreviewHandler = NULL; + beforePreviewHandler = nullptr; if (beforeIpc) { rtengine::StagedImageProcessor::destroy (beforeIpc); } - beforeIpc = NULL; + beforeIpc = nullptr; } if (beforeAfter->get_active ()) { int errorCode = 0; - rtengine::InitialImage *beforeImg = rtengine::InitialImage::load ( isrc->getImageSource ()->getFileName(), openThm->getType() == FT_Raw , &errorCode, NULL); + rtengine::InitialImage *beforeImg = rtengine::InitialImage::load ( isrc->getImageSource ()->getFileName(), openThm->getType() == FT_Raw , &errorCode, nullptr); if( !beforeImg || errorCode ) { return; @@ -1889,19 +1969,12 @@ void EditorPanel::histogramChanged (LUTu & histRed, LUTu & histGreen, LUTu & his bool EditorPanel::CheckSidePanelsVisibility() { if (tbTopPanel_1) { - if(tbTopPanel_1->get_active() == false && tbRightPanel_1->get_active() == false && hidehp->get_active() == false) { - return false; - } - - return true; + return tbTopPanel_1->get_active() || tbRightPanel_1->get_active() || hidehp->get_active(); } - if(tbRightPanel_1->get_active() == false && hidehp->get_active() == false) { - return false; - } - - return true; + return tbRightPanel_1->get_active() || hidehp->get_active(); } + void EditorPanel::toggleSidePanels() { // Maximize preview panel: @@ -1917,7 +1990,7 @@ void EditorPanel::toggleSidePanels() tbRightPanel_1->set_active (!bAllSidePanelsVisible); hidehp->set_active (!bAllSidePanelsVisible); - if (bAllSidePanelsVisible == false) { + if (!bAllSidePanelsVisible) { tbShowHideSidePanels->set_image (*iShowHideSidePanels); } else { tbShowHideSidePanels->set_image (*iShowHideSidePanels_exit); @@ -1970,7 +2043,7 @@ void EditorPanel::updateHistogramPosition (int oldPosition, int newPosition) } delete histogramPanel; - histogramPanel = NULL; + histogramPanel = nullptr; } // else no need to create it diff --git a/rtgui/editorpanel.h b/rtgui/editorpanel.h index e506e1583..ac2be9566 100644 --- a/rtgui/editorpanel.h +++ b/rtgui/editorpanel.h @@ -84,8 +84,8 @@ protected: Gtk::Button* navNext; Gtk::Button* navPrev; - class MonitorProfileSelector; - std::unique_ptr monitorProfile; + class ColorManagementToolbar; + std::unique_ptr colorMgmtToolBar; ImageAreaPanel* iareapanel; PreviewHandler* previewHandler; @@ -138,7 +138,7 @@ protected: public: - EditorPanel (FilePanel* filePanel = NULL); + explicit EditorPanel (FilePanel* filePanel = nullptr); virtual ~EditorPanel (); void open (Thumbnail* tmb, rtengine::InitialImage* isrc); @@ -167,7 +167,7 @@ public: void refreshProcessingState (bool inProcessing); // this is called by setProcessingState in the gtk thread // PParamsChangeListener interface - void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = NULL); + void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = nullptr); // thumbnaillistener interface void procParamsChanged (Thumbnail* thm, int whoChangedIt); diff --git a/rtgui/editwindow.cc b/rtgui/editwindow.cc index 605e915af..3115d9c1f 100644 --- a/rtgui/editwindow.cc +++ b/rtgui/editwindow.cc @@ -37,7 +37,7 @@ EditWindow* EditWindow::getInstance(RTWindow* p) { EditWindow editWnd; - EditWindowInstance(RTWindow* p) : editWnd(p) + explicit EditWindowInstance(RTWindow* p) : editWnd(p) { // Determine the other display and maximize the window on that const Glib::RefPtr< Gdk::Window >& wnd = p->get_window(); diff --git a/rtgui/editwindow.h b/rtgui/editwindow.h index fa47de489..9315b0eb9 100644 --- a/rtgui/editwindow.h +++ b/rtgui/editwindow.h @@ -42,7 +42,7 @@ public: // Should only be created once, auto-creates window on correct display static EditWindow* getInstance(RTWindow* p); - EditWindow (RTWindow* p); + explicit EditWindow (RTWindow* p); void addEditorPanel (EditorPanel* ep, const std::string &name); void remEditorPanel (EditorPanel* ep); diff --git a/rtgui/epd.h b/rtgui/epd.h index 6156d947c..c9fc5d0af 100644 --- a/rtgui/epd.h +++ b/rtgui/epd.h @@ -36,9 +36,9 @@ public: EdgePreservingDecompositionUI(); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/exifpanel.cc b/rtgui/exifpanel.cc index c7e47ef57..2decd48eb 100644 --- a/rtgui/exifpanel.cc +++ b/rtgui/exifpanel.cc @@ -25,7 +25,7 @@ using namespace rtengine; using namespace rtengine::procparams; using namespace rtexif; -ExifPanel::ExifPanel () : idata(NULL) +ExifPanel::ExifPanel () : idata(nullptr) { recursiveOp = true; @@ -156,7 +156,7 @@ void ExifPanel::setImageData (const ImageMetaData* id) idata = id; exifTreeModel->clear (); - const std::vector defTags = ExifManager::getDefaultTIFFTags (NULL); + const std::vector defTags = ExifManager::getDefaultTIFFTags (nullptr); for (size_t i = 0; i < defTags.size(); i++) { Tag* defTag = defTags[i]; @@ -430,7 +430,7 @@ void ExifPanel::addPressed () } else { tcombo->set_active_text (sel); - if (tcombo->get_active () < 0) { + if (!tcombo->get_active ()) { tcombo->append_text (sel); tcombo->set_active_text (sel); } @@ -582,7 +582,7 @@ void ExifPanel::updateChangeList (Gtk::TreeModel::Children root, std::string pre Gtk::TreeModel::iterator iter; for (iter = root.begin(); iter != root.end(); ++iter) { - if (iter->get_value (exifColumns.edited) == true) { + if (iter->get_value (exifColumns.edited)) { changeList[ prefix + iter->get_value (exifColumns.field_nopango) ] = iter->get_value (exifColumns.value_nopango); } else if (iter->get_value (exifColumns.action) == AC_WRITE && iter->get_value (exifColumns.icon) == delicon) { changeList[ prefix + iter->get_value (exifColumns.field_nopango) ] = "#delete"; diff --git a/rtgui/exifpanel.h b/rtgui/exifpanel.h index 2269fed25..fd797ff56 100644 --- a/rtgui/exifpanel.h +++ b/rtgui/exifpanel.h @@ -89,9 +89,9 @@ public: ExifPanel (); virtual ~ExifPanel (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setImageData (const rtengine::ImageMetaData* id); diff --git a/rtgui/exportpanel.cc b/rtgui/exportpanel.cc index 2e25ab6cf..394230855 100644 --- a/rtgui/exportpanel.cc +++ b/rtgui/exportpanel.cc @@ -25,7 +25,7 @@ using namespace rtengine; using namespace rtengine::procparams; -ExportPanel::ExportPanel () : listener (NULL) +ExportPanel::ExportPanel () : listener (nullptr) { set_border_width (4); diff --git a/rtgui/extprog.cc b/rtgui/extprog.cc index 06f99826d..d0cf44151 100644 --- a/rtgui/extprog.cc +++ b/rtgui/extprog.cc @@ -102,7 +102,7 @@ void ExtProgStore::init () #endif } - +#ifdef WIN32 bool ExtProgStore::searchProgram (const Glib::ustring& name, const Glib::ustring& exePath, const Glib::ustring& exePath86, @@ -111,7 +111,6 @@ bool ExtProgStore::searchProgram (const Glib::ustring& name, bool allowQueueProcess) { -#ifdef WIN32 // get_user_special_dir crashes on some Windows configurations. static Glib::ustring progFilesDir, progFilesDirx86; @@ -196,10 +195,10 @@ bool ExtProgStore::searchProgram (const Glib::ustring& name, return true; } -#endif return false; } +#endif bool ExtProgStore::spawnCommandAsync (const Glib::ustring& cmd) { @@ -227,7 +226,7 @@ bool ExtProgStore::spawnCommandSync (const Glib::ustring& cmd) try { - Glib::spawn_command_line_sync (cmd, NULL, NULL, &exitStatus); + Glib::spawn_command_line_sync (cmd, nullptr, nullptr, &exitStatus); } catch (const Glib::Exception& exception) { diff --git a/rtgui/extprog.h b/rtgui/extprog.h index fe7375ce7..154a825e1 100644 --- a/rtgui/extprog.h +++ b/rtgui/extprog.h @@ -44,13 +44,14 @@ class ExtProgStore MyMutex mtx; // covers actions std::vector actions; +#ifdef WIN32 bool searchProgram (const Glib::ustring& name, const Glib::ustring& exePath, const Glib::ustring& exePath86, int maxVer, bool allowRaw, bool allowQueueProcess); - +#endif public: static ExtProgStore* getInstance(); diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc index 68825c696..b11361db2 100644 --- a/rtgui/filebrowser.cc +++ b/rtgui/filebrowser.cc @@ -50,7 +50,7 @@ const Glib::ustring* getOriginalExtension (const ThumbBrowserEntryBase* entry) const Glib::ustring::size_type pos = basename.find_last_of ('.'); if (pos >= basename.length () - 1) { - return NULL; + return nullptr; } const Glib::ustring extension = basename.substr (pos + 1); @@ -62,12 +62,12 @@ const Glib::ustring* getOriginalExtension (const ThumbBrowserEntryBase* entry) } } - return NULL; + return nullptr; } ThumbBrowserEntryBase* selectOriginalEntry (ThumbBrowserEntryBase* original, ThumbBrowserEntryBase* candidate) { - if (original == NULL) { + if (original == nullptr) { return candidate; } @@ -97,7 +97,7 @@ void findOriginalEntries (const std::vector& entries) const Glib::ustring::size_type pos = basename.find_last_of ('.'); if (pos >= basename.length () - 1) { - (*entry)->setOriginal (NULL); + (*entry)->setOriginal (nullptr); continue; } @@ -109,7 +109,7 @@ void findOriginalEntries (const std::vector& entries) // Find the original image for each bucket for (BasenameIterator bucket = byBasename.begin (); bucket != byBasename.end (); ++bucket) { const EntryVector& entries = bucket->second; - ThumbBrowserEntryBase* original = NULL; + ThumbBrowserEntryBase* original = nullptr; // Select the most likely original in a first pass... for (EntryIterator entry = entries.begin (); entry != entries.end (); ++entry) { @@ -118,7 +118,7 @@ void findOriginalEntries (const std::vector& entries) // ...and link all other images to it in a second pass. for (EntryIterator entry = entries.begin (); entry != entries.end (); ++entry) { - (*entry)->setOriginal (*entry != original ? original : NULL); + (*entry)->setOriginal (*entry != original ? original : nullptr); } } } @@ -126,7 +126,7 @@ void findOriginalEntries (const std::vector& entries) } FileBrowser::FileBrowser () - : tbl(NULL), numFiltered(0), partialPasteDlg(M("PARTIALPASTE_DIALOGLABEL")) + : tbl(nullptr), numFiltered(0), partialPasteDlg(M("PARTIALPASTE_DIALOGLABEL")) { fbih = new FileBrowserIdleHelper; @@ -225,12 +225,12 @@ FileBrowser::FileBrowser () #if defined(WIN32) Gtk::manage(miOpenDefaultViewer = new Gtk::MenuItem (M("FILEBROWSER_OPENDEFAULTVIEWER"))); #else - miOpenDefaultViewer = NULL; + miOpenDefaultViewer = nullptr; #endif // Build a list of menu items mMenuExtProgs.clear(); - amiExtProg = NULL; + amiExtProg = nullptr; for (const auto& action : extProgStore->getActions ()) { if (action.target == 1 || action.target == 2) { @@ -239,7 +239,7 @@ FileBrowser::FileBrowser () } // Attach them to menu - if (!mMenuExtProgs.empty() || miOpenDefaultViewer != NULL) { + if (!mMenuExtProgs.empty() || miOpenDefaultViewer != nullptr) { amiExtProg = new Gtk::MenuItem*[mMenuExtProgs.size()]; int itemNo = 0; @@ -248,7 +248,7 @@ FileBrowser::FileBrowser () p++; Gtk::Menu* submenuExtProg = Gtk::manage (new Gtk::Menu()); - if (miOpenDefaultViewer != NULL) { + if (miOpenDefaultViewer != nullptr) { submenuExtProg->attach (*miOpenDefaultViewer, 0, 1, p, p + 1); p++; } @@ -261,7 +261,7 @@ FileBrowser::FileBrowser () submenuExtProg->show_all (); menuExtProg->set_submenu (*submenuExtProg); } else { - if (miOpenDefaultViewer != NULL) { + if (miOpenDefaultViewer != nullptr) { pmenu->attach (*miOpenDefaultViewer, 0, 1, p, p + 1); p++; } @@ -417,7 +417,7 @@ FileBrowser::FileBrowser () amiExtProg[i]->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), amiExtProg[i])); } - if (miOpenDefaultViewer != NULL) { + if (miOpenDefaultViewer != nullptr) { miOpenDefaultViewer->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), miOpenDefaultViewer)); } @@ -487,13 +487,13 @@ void FileBrowser::rightClicked (ThumbBrowserEntryBase* entry) untrash->set_sensitive (false); for (size_t i = 0; i < selected.size(); i++) - if ((static_cast(selected[i]))->thumbnail->getStage() == 1) { + if ((static_cast(selected[i]))->thumbnail->getStage()) { untrash->set_sensitive (true); break; } for (size_t i = 0; i < selected.size(); i++) - if ((static_cast(selected[i]))->thumbnail->getStage() == 0) { + if (!(static_cast(selected[i]))->thumbnail->getStage()) { trash->set_sensitive (true); break; } @@ -512,7 +512,6 @@ void FileBrowser::rightClicked (ThumbBrowserEntryBase* entry) submenuDF->attach (*Gtk::manage(autoDF = new Gtk::MenuItem (M("FILEBROWSER_AUTODARKFRAME"))), 0, 1, p, p + 1); p++; submenuDF->attach (*Gtk::manage(thisIsDF = new Gtk::MenuItem (M("FILEBROWSER_MOVETODARKFDIR"))), 0, 1, p, p + 1); - p++; selectDF->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), selectDF)); autoDF->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), autoDF)); thisIsDF->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), thisIsDF )); @@ -527,7 +526,6 @@ void FileBrowser::rightClicked (ThumbBrowserEntryBase* entry) submenuFF->attach (*Gtk::manage(autoFF = new Gtk::MenuItem (M("FILEBROWSER_AUTOFLATFIELD"))), 0, 1, p, p + 1); p++; submenuFF->attach (*Gtk::manage(thisIsFF = new Gtk::MenuItem (M("FILEBROWSER_MOVETOFLATFIELDDIR"))), 0, 1, p, p + 1); - p++; selectFF->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), selectFF)); autoFF->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), autoFF)); thisIsFF->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), thisIsFF )); @@ -612,7 +610,7 @@ void FileBrowser::addEntry_ (FileBrowserEntry* entry) entry->addButtonSet (new FileThumbnailButtonSet (entry)); entry->getThumbButtonSet()->setRank (entry->thumbnail->getRank()); entry->getThumbButtonSet()->setColorLabel (entry->thumbnail->getColorLabel()); - entry->getThumbButtonSet()->setInTrash (entry->thumbnail->getStage() == 1); + entry->getThumbButtonSet()->setInTrash (entry->thumbnail->getStage()); entry->getThumbButtonSet()->setButtonListener (this); entry->resize (getThumbnailHeight()); @@ -659,7 +657,7 @@ FileBrowserEntry* FileBrowser::delEntry (const Glib::ustring& fname) } if (lastClicked == entry) { - lastClicked = NULL; + lastClicked = nullptr; } redraw (); @@ -667,7 +665,7 @@ FileBrowserEntry* FileBrowser::delEntry (const Glib::ustring& fname) return (static_cast(entry)); } - return NULL; + return nullptr; } void FileBrowser::close () @@ -702,7 +700,7 @@ void FileBrowser::close () fd.clear (); } - lastClicked = NULL; + lastClicked = nullptr; } void FileBrowser::menuColorlabelActivated (Gtk::MenuItem* m) @@ -792,7 +790,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) else if (m == rename) { tbl->renameRequested (mselected); } else if (m == selall) { - lastClicked = NULL; + lastClicked = nullptr; { MYWRITERLOCK(l, entryRW); @@ -823,7 +821,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) rtengine::procparams::ProcParams pp = mselected[i]->thumbnail->getProcParams(); pp.raw.df_autoselect = true; pp.raw.dark_frame.clear(); - mselected[i]->thumbnail->setProcParams(pp, NULL, FILEBROWSER, false); + mselected[i]->thumbnail->setProcParams(pp, nullptr, FILEBROWSER, false); } if (!mselected.empty() && bppcl) { @@ -851,7 +849,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) rtengine::procparams::ProcParams pp = mselected[i]->thumbnail->getProcParams(); pp.raw.dark_frame = fc.get_filename(); pp.raw.df_autoselect = false; - mselected[i]->thumbnail->setProcParams(pp, NULL, FILEBROWSER, false); + mselected[i]->thumbnail->setProcParams(pp, nullptr, FILEBROWSER, false); } if (bppcl) { @@ -900,7 +898,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) rtengine::procparams::ProcParams pp = mselected[i]->thumbnail->getProcParams(); pp.raw.ff_AutoSelect = true; pp.raw.ff_file.clear(); - mselected[i]->thumbnail->setProcParams(pp, NULL, FILEBROWSER, false); + mselected[i]->thumbnail->setProcParams(pp, nullptr, FILEBROWSER, false); } if (!mselected.empty() && bppcl) { @@ -927,7 +925,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) rtengine::procparams::ProcParams pp = mselected[i]->thumbnail->getProcParams(); pp.raw.ff_file = fc.get_filename(); pp.raw.ff_AutoSelect = false; - mselected[i]->thumbnail->setProcParams(pp, NULL, FILEBROWSER, false); + mselected[i]->thumbnail->setProcParams(pp, nullptr, FILEBROWSER, false); } if (bppcl) { @@ -989,7 +987,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) // Empty run to update the thumb rtengine::procparams::ProcParams params = mselected[i]->thumbnail->getProcParams (); - mselected[i]->thumbnail->setProcParams (params, NULL, FILEBROWSER); + mselected[i]->thumbnail->setProcParams (params, nullptr, FILEBROWSER); } if (!mselected.empty() && bppcl) { @@ -1007,7 +1005,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) } //queue_draw (); - } else if (miOpenDefaultViewer != NULL && m == miOpenDefaultViewer) { + } else if (miOpenDefaultViewer != nullptr && m == miOpenDefaultViewer) { openDefaultViewer(1); } } @@ -1090,7 +1088,7 @@ void FileBrowser::partPasteProfile () // copying read only clipboard PartialProfile to a temporary one, initialized to the thumb's ProcParams mselected[i]->thumbnail->createProcParamsForUpdate(false, false); // this can execute customprofilebuilder to generate param file rtengine::procparams::PartialProfile cbPartProf = clipboard.getPartialProfile(); - rtengine::procparams::PartialProfile pastedPartProf(&mselected[i]->thumbnail->getProcParams (), NULL); + rtengine::procparams::PartialProfile pastedPartProf(&mselected[i]->thumbnail->getProcParams (), nullptr); // pushing the selected values of the clipboard PartialProfile to the temporary PartialProfile partialPasteDlg.applyPaste (pastedPartProf.pparams, pastedPartProf.pedited, cbPartProf.pparams, cbPartProf.pedited); @@ -1134,8 +1132,9 @@ bool FileBrowser::keyPressed (GdkEventKey* event) bool ctrl = event->state & GDK_CONTROL_MASK; bool shift = event->state & GDK_SHIFT_MASK; bool alt = event->state & GDK_MOD1_MASK; +#ifdef __WIN32__ bool altgr = event->state & GDK_MOD2_MASK; - +#endif if ((event->keyval == GDK_C || event->keyval == GDK_c || event->keyval == GDK_Insert) && ctrl) { copyProfile (); return true; @@ -1439,7 +1438,7 @@ void FileBrowser::applyFilter (const BrowserFilter& filter) selected.erase (j); if (lastClicked == fd[i]) { - lastClicked = NULL; + lastClicked = nullptr; } selchanged = true; @@ -1460,13 +1459,13 @@ bool FileBrowser::checkFilter (ThumbBrowserEntryBase* entryb) // true -> entry FileBrowserEntry* entry = static_cast(entryb); - if (filter.showOriginal && entry->getOriginal() != NULL) { + if (filter.showOriginal && entry->getOriginal() != nullptr) { return false; } // return false if basic filter settings are not satisfied - if ((filter.showRanked[entry->thumbnail->getRank()] == false ) || - (filter.showCLabeled[entry->thumbnail->getColorLabel()] == false ) || + if ((!filter.showRanked[entry->thumbnail->getRank()] ) || + (!filter.showCLabeled[entry->thumbnail->getColorLabel()] ) || ((entry->thumbnail->hasProcParams() && filter.showEdited[0]) && !filter.showEdited[1]) || ((!entry->thumbnail->hasProcParams() && filter.showEdited[1]) && !filter.showEdited[0]) || @@ -1474,8 +1473,8 @@ bool FileBrowser::checkFilter (ThumbBrowserEntryBase* entryb) // true -> entry ((entry->thumbnail->isRecentlySaved() && filter.showRecentlySaved[0]) && !filter.showRecentlySaved[1]) || ((!entry->thumbnail->isRecentlySaved() && filter.showRecentlySaved[1]) && !filter.showRecentlySaved[0]) || - (entry->thumbnail->getStage() == 1 && !filter.showTrash) || - (entry->thumbnail->getStage() == 0 && !filter.showNotTrash)) { + (entry->thumbnail->getStage() && !filter.showTrash) || + (!entry->thumbnail->getStage() && !filter.showNotTrash)) { return false; } @@ -1516,7 +1515,7 @@ bool FileBrowser::checkFilter (ThumbBrowserEntryBase* entryb) // true -> entry } } - if (MatchEqual == true) { + if (MatchEqual) { if (iFilenameMatch == 0) { //none of the vFilterStrings found in FileName return false; } @@ -1568,11 +1567,11 @@ void FileBrowser::toTrashRequested (std::vector tbe) // no need to notify listeners as item goes to trash, likely to be deleted - if (tbe[i]->thumbnail->getStage() == 1) { + if (tbe[i]->thumbnail->getStage()) { continue; } - tbe[i]->thumbnail->setStage (1); + tbe[i]->thumbnail->setStage (true); if (tbe[i]->getThumbButtonSet()) { tbe[i]->getThumbButtonSet()->setRank (tbe[i]->thumbnail->getRank()); @@ -1592,11 +1591,11 @@ void FileBrowser::fromTrashRequested (std::vector tbe) for (size_t i = 0; i < tbe.size(); i++) { // if thumbnail was marked inTrash=true then param file must be there, no need to run customprofilebuilder - if (tbe[i]->thumbnail->getStage() == 0) { + if (!tbe[i]->thumbnail->getStage()) { continue; } - tbe[i]->thumbnail->setStage (0); + tbe[i]->thumbnail->setStage (false); if (tbe[i]->getThumbButtonSet()) { tbe[i]->getThumbButtonSet()->setRank (tbe[i]->thumbnail->getRank()); @@ -1715,7 +1714,7 @@ void FileBrowser::buttonPressed (LWButton* button, int actionCode, void* actionD FileBrowserEntry* entry = static_cast(actionData); tbe.push_back (entry); - if (entry->thumbnail->getStage() == 0) { + if (!entry->thumbnail->getStage()) { toTrashRequested (tbe); } else { fromTrashRequested (tbe); diff --git a/rtgui/filebrowserentry.cc b/rtgui/filebrowserentry.cc index f2977b742..57deca4fd 100644 --- a/rtgui/filebrowserentry.cc +++ b/rtgui/filebrowserentry.cc @@ -36,7 +36,7 @@ Glib::RefPtr FileBrowserEntry::recentlySavedIcon; Glib::RefPtr FileBrowserEntry::enqueuedIcon; FileBrowserEntry::FileBrowserEntry (Thumbnail* thm, const Glib::ustring& fname) - : ThumbBrowserEntryBase (fname), wasInside(false), iatlistener(NULL), cropgl(NULL), state(SNormal) + : ThumbBrowserEntryBase (fname), wasInside(false), iatlistener(nullptr), cropgl(nullptr), state(SNormal) { thumbnail = thm; @@ -71,7 +71,7 @@ FileBrowserEntry::~FileBrowserEntry () feih->destroyed = true; } else { delete feih; - feih = 0; + feih = nullptr; } thumbImageUpdater->removeJobs (this); @@ -213,7 +213,7 @@ void FileBrowserEntry::updateImage (rtengine::IImage8* img, double scale, rtengi { GThreadLock lock; - if ( feih == 0 || + if ( feih == nullptr || feih->destroyed ) { img->free(); return; @@ -231,7 +231,7 @@ void FileBrowserEntry::updateImage (rtengine::IImage8* img, double scale, rtengi #if __GNUC__ == 4 && __GNUC_MINOR__ == 8 && defined( WIN32 ) && defined(__x86_64__) g_idle_add_full (G_PRIORITY_DEFAULT, updateImageUI, param, NULL); #else - g_idle_add_full (G_PRIORITY_LOW, updateImageUI, param, NULL); + g_idle_add_full (G_PRIORITY_LOW, updateImageUI, param, nullptr); #endif } @@ -252,10 +252,10 @@ void FileBrowserEntry::_updateImage (rtengine::IImage8* img, double s, rtengine: GThreadLock lock; // Check if image has been rotated since last time - rotated = preview != NULL && newLandscape != landscape; + rotated = preview != nullptr && newLandscape != landscape; guint8* temp = preview; - preview = NULL; + preview = nullptr; delete [] temp; temp = new guint8 [prew * preh * 3]; memcpy (temp, img->getData(), prew * preh * 3); @@ -267,7 +267,7 @@ void FileBrowserEntry::_updateImage (rtengine::IImage8* img, double s, rtengine: img->free (); - if (parent != NULL) { + if (parent != nullptr) { if (rotated) { parent->thumbRearrangementNeeded(); } else if (redrawRequests == 0) { @@ -532,7 +532,7 @@ bool FileBrowserEntry::releaseNotify (int button, int type, int bstate, int x, i } } else if (cropgl && (state == SCropSelecting || state == SResizeH1 || state == SResizeH2 || state == SResizeW1 || state == SResizeW2 || state == SResizeTL || state == SResizeTR || state == SResizeBL || state == SResizeBR || state == SCropMove)) { cropgl->cropManipReady (); - cropgl = NULL; + cropgl = nullptr; iatlistener->cropSelectionReady (); if (iatlistener->getToolBar()) { diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index 3ed7608f1..97407fb1e 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -44,10 +44,10 @@ using namespace std; FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : filepanel(filepanel), selectedDirectoryId(1), - listener(NULL), - fslistener(NULL), + listener(nullptr), + fslistener(nullptr), hasValidCurrentEFS(false), - filterPanel(NULL), + filterPanel(nullptr), previewsToLoad(0), previewsLoaded(0), coarsePanel(cp), @@ -667,8 +667,8 @@ void FileCatalog::_refreshProgressBar () GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected Gtk::Notebook *nb = (Gtk::Notebook *)(filepanel->get_parent()); - Gtk::Box* hbb = NULL; - Gtk::Label *label = NULL; + Gtk::Box* hbb = nullptr; + Gtk::Label *label = nullptr; if( options.mainNBVertical ) { hbb = Gtk::manage (new Gtk::VBox ()); @@ -880,7 +880,7 @@ void FileCatalog::refreshHeight () void FileCatalog::_openImage (std::vector tmb) { - if (enabled && listener != NULL) { + if (enabled && listener != nullptr) { bool continueToLoad = true; for (size_t i = 0; i < tmb.size() && continueToLoad; i++) { @@ -989,9 +989,6 @@ void FileCatalog::copyMoveRequested (std::vector tbe, bool m fc.set_filename(tbe[0]->filename); //!!! TODO prevent dialog closing on "enter" key press - bool filecopymovecomplete; - int i_copyindex; - if( fc.run() == Gtk::RESPONSE_OK ) { Glib::ustring dest_Dir = fc.get_current_folder(); @@ -1020,8 +1017,8 @@ void FileCatalog::copyMoveRequested (std::vector tbe, bool m /* comparison of src_Dir and dest_Dir is done per image for compatibility with possible future use of Collections as source where each file's source path may be different.*/ - filecopymovecomplete = false; - i_copyindex = 1; + bool filecopymovecomplete = false; + int i_copyindex = 1; while(!filecopymovecomplete) { // check for filename conflicts at destination - prevent overwriting (actually RT will crash on overwriting attempt) @@ -1179,6 +1176,7 @@ void FileCatalog::developRequested (std::vector tbe, bool fas params.icm.working = options.fastexport_icm_working ; params.icm.output = options.fastexport_icm_output ; params.icm.outputIntent = options.fastexport_icm_outputIntent ; + params.icm.outputBPC = options.fastexport_icm_outputBPC ; params.icm.gamma = options.fastexport_icm_gamma ; params.resize.enabled = options.fastexport_resize_enabled ; params.resize.scale = options.fastexport_resize_scale ; @@ -1224,8 +1222,6 @@ void FileCatalog::setExportPanel (ExportPanel* expanel) void FileCatalog::renameRequested (std::vector tbe) { - bool success; - RenameDialog* renameDlg = new RenameDialog ((Gtk::Window*)get_toplevel()); for (size_t i = 0; i < tbe.size(); i++) { @@ -1235,7 +1231,7 @@ void FileCatalog::renameRequested (std::vector tbe) Glib::ustring dirName = Glib::path_get_dirname (tbe[i]->filename); Glib::ustring baseName = Glib::path_get_basename (tbe[i]->filename); - success = false; + bool success = false; do { if (renameDlg->run () == Gtk::RESPONSE_OK) { @@ -2127,12 +2123,9 @@ void FileCatalog::tbRightPanel_1_toggled () bool FileCatalog::CheckSidePanelsVisibility() { - if(tbLeftPanel_1->get_active() == false && tbRightPanel_1->get_active() == false) { - return false; - } else { - return true; - } + return tbLeftPanel_1->get_active() || tbRightPanel_1->get_active(); } + void FileCatalog::toggleSidePanels() { // toggle left AND right panels @@ -2544,11 +2537,7 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) } } - if (fileBrowser->keyPressed(event)) { - return true; - } - - return false; + return fileBrowser->keyPressed(event); } void FileCatalog::showToolBar() diff --git a/rtgui/filecatalog.h b/rtgui/filecatalog.h index b7ea1802f..eb23e65a6 100644 --- a/rtgui/filecatalog.h +++ b/rtgui/filecatalog.h @@ -43,7 +43,7 @@ class DirEntry public: Glib::ustring fullName; - DirEntry (const Glib::ustring& n) : fullName (n) {} + explicit DirEntry (const Glib::ustring& n) : fullName (n) {} bool operator< (DirEntry& other) { diff --git a/rtgui/filepanel.cc b/rtgui/filepanel.cc index fd53db555..a88a9d224 100644 --- a/rtgui/filepanel.cc +++ b/rtgui/filepanel.cc @@ -28,7 +28,7 @@ int FilePanelInitUI (void* data) return 0; } -FilePanel::FilePanel () : parent(NULL) +FilePanel::FilePanel () : parent(nullptr) { dirpaned = Gtk::manage ( new Gtk::HPaned () ); @@ -52,7 +52,6 @@ FilePanel::FilePanel () : parent(NULL) dirpaned->pack1 (*placespaned, false, true); tpc = new BatchToolPanelCoordinator (this); - tpc->removeWbTool(); fileCatalog = Gtk::manage ( new FileCatalog (tpc->coarse, tpc->getToolBar(), this) ); ribbonPane = Gtk::manage ( new Gtk::Paned() ); ribbonPane->add(*fileCatalog); @@ -228,7 +227,7 @@ bool FilePanel::fileSelected (Thumbnail* thm) pendingLoadMutex.lock(); pendingLoad *pl = new pendingLoad(); pl->complete = false; - pl->pc = 0; + pl->pc = nullptr; pl->thm = thm; pendingLoads.push_back(pl); pendingLoadMutex.unlock(); diff --git a/rtgui/filethumbnailbuttonset.h b/rtgui/filethumbnailbuttonset.h index b152c3853..a83bacf7b 100644 --- a/rtgui/filethumbnailbuttonset.h +++ b/rtgui/filethumbnailbuttonset.h @@ -44,7 +44,7 @@ public: static Cairo::RefPtr colorLabelIcon_4; static Cairo::RefPtr colorLabelIcon_5; - FileThumbnailButtonSet (FileBrowserEntry* myEntry); + explicit FileThumbnailButtonSet (FileBrowserEntry* myEntry); void setRank (int stars); void setColorLabel (int colorlabel); void setInTrash (bool inTrash); diff --git a/rtgui/filmsimulation.h b/rtgui/filmsimulation.h index 440bf0c9e..9979f45b3 100644 --- a/rtgui/filmsimulation.h +++ b/rtgui/filmsimulation.h @@ -39,8 +39,8 @@ public: void adjusterChanged( Adjuster* a, double newval ); void setBatchMode( bool batchMode ); - void read( const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL ); - void write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL ); + void read( const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr ); + void write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr ); void setAdjusterBehavior( bool strength ); void trimValues( rtengine::procparams::ProcParams* pp ); diff --git a/rtgui/filterpanel.cc b/rtgui/filterpanel.cc index 5a118d6e1..483d292ea 100644 --- a/rtgui/filterpanel.cc +++ b/rtgui/filterpanel.cc @@ -23,7 +23,7 @@ using namespace rtengine; -FilterPanel::FilterPanel () : listener (NULL) +FilterPanel::FilterPanel () : listener (nullptr) { set_border_width (4); diff --git a/rtgui/flatcurveeditorsubgroup.cc b/rtgui/flatcurveeditorsubgroup.cc index fd975de5e..1177e7cfe 100644 --- a/rtgui/flatcurveeditorsubgroup.cc +++ b/rtgui/flatcurveeditorsubgroup.cc @@ -171,7 +171,7 @@ void FlatCurveEditorSubGroup::stopNumericalAdjustment() */ void FlatCurveEditorSubGroup::refresh(CurveEditor *curveToRefresh) { - if (curveToRefresh != NULL && curveToRefresh == static_cast(parent->displayedCurve)) { + if (curveToRefresh != nullptr && curveToRefresh == static_cast(parent->displayedCurve)) { switch(FlatCurveType(curveToRefresh->curveType->getSelected())) { case (FCT_MinMaxCPoints): CPointsCurve->refresh(); @@ -192,7 +192,7 @@ void FlatCurveEditorSubGroup::editModeSwitchedOff () // toggling off all edit buttons, even if only one is toggle on bool prevState = editCPointsConn.block(true); editCPoints->set_active(false); - CPointsCurve->pipetteMouseOver(NULL, NULL, 0); + CPointsCurve->pipetteMouseOver(nullptr, nullptr, 0); CPointsCurve->setDirty(true); if (!prevState) { @@ -288,11 +288,11 @@ void FlatCurveEditorSubGroup::switchGUI() ColorProvider *barColorProvider = dCurve->getLeftBarColorProvider(); std::vector bgGradient = dCurve->getLeftBarBgGradient(); - if (barColorProvider == NULL && bgGradient.size() == 0) { + if (barColorProvider == nullptr && bgGradient.size() == 0) { // dCurve has no left colored bar, so we delete the object if (leftBar) { delete leftBar; - leftBar = NULL; + leftBar = nullptr; } } else { // dCurve has a ColorProvider or a background gradient defined, so we create/update the object @@ -305,7 +305,7 @@ void FlatCurveEditorSubGroup::switchGUI() leftBar->setColorProvider(barColorProvider, dCurve->getLeftBarCallerId()); leftBar->setBgGradient (bgGradient); } else { - leftBar->setColorProvider(NULL, -1); + leftBar->setColorProvider(nullptr, -1); leftBar->setBgGradient (bgGradient); } } @@ -313,11 +313,11 @@ void FlatCurveEditorSubGroup::switchGUI() barColorProvider = dCurve->getBottomBarColorProvider(); bgGradient = dCurve->getBottomBarBgGradient(); - if (barColorProvider == NULL && bgGradient.size() == 0) { + if (barColorProvider == nullptr && bgGradient.size() == 0) { // dCurve has no bottom colored bar, so we delete the object if (bottomBar) { delete bottomBar; - bottomBar = NULL; + bottomBar = nullptr; } } else { // dCurve ave a ColorProvider or a background gradient defined, so we create/update the object @@ -330,7 +330,7 @@ void FlatCurveEditorSubGroup::switchGUI() bottomBar->setColorProvider(barColorProvider, dCurve->getBottomBarCallerId()); bottomBar->setBgGradient (bgGradient); } else { - bottomBar->setColorProvider(NULL, -1); + bottomBar->setColorProvider(nullptr, -1); bottomBar->setBgGradient (bgGradient); } } diff --git a/rtgui/flatfield.h b/rtgui/flatfield.h index b85b154da..4c0a33a54 100644 --- a/rtgui/flatfield.h +++ b/rtgui/flatfield.h @@ -62,12 +62,12 @@ public: FlatField (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void setAdjusterBehavior (bool clipctrladd); void trimValues (rtengine::procparams::ProcParams* pp); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void adjusterChanged (Adjuster* a, double newval); void adjusterAutoToggled (Adjuster* a, bool newval); diff --git a/rtgui/gradient.h b/rtgui/gradient.h index d1acb764b..2201ea7c4 100644 --- a/rtgui/gradient.h +++ b/rtgui/gradient.h @@ -37,9 +37,9 @@ public: Gradient (); ~Gradient (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/guiutils.cc b/rtgui/guiutils.cc index c984a03f1..241bd2963 100644 --- a/rtgui/guiutils.cc +++ b/rtgui/guiutils.cc @@ -473,9 +473,9 @@ void MyExpander::init() } MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) : - enabled(false), inconsistent(false), flushEvent(false), expBox(NULL), - child(NULL), headerWidget(NULL), statusImage(NULL), - label(NULL), useEnabled(useEnabled) + enabled(false), inconsistent(false), flushEvent(false), expBox(nullptr), + child(nullptr), headerWidget(nullptr), statusImage(nullptr), + label(nullptr), useEnabled(useEnabled) { set_spacing(options.slimUI ? 0 : 2); set_name("MyExpander"); @@ -520,9 +520,9 @@ MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) : } MyExpander::MyExpander(bool useEnabled, Glib::ustring titleLabel) : - enabled(false), inconsistent(false), flushEvent(false), expBox(NULL), - child(NULL), headerWidget(NULL), statusImage(NULL), - label(NULL), useEnabled(useEnabled) + enabled(false), inconsistent(false), flushEvent(false), expBox(nullptr), + child(nullptr), headerWidget(nullptr), statusImage(nullptr), + label(nullptr), useEnabled(useEnabled) { set_spacing(options.slimUI ? 0 : 2); set_name("MyExpander"); @@ -1024,8 +1024,8 @@ void bindCurrentFolder (Gtk::FileChooser& chooser, Glib::ustring& variable) TextOrIcon::TextOrIcon (Glib::ustring fname, Glib::ustring labelTx, Glib::ustring tooltipTx, TOITypes type) { - imgIcon = 0; - label = 0; + imgIcon = nullptr; + label = nullptr; filename = fname; labelText = labelTx; tooltipText = tooltipTx; @@ -1051,7 +1051,7 @@ void TextOrIcon::switchTo(TOITypes type) if (!imgIcon) { removeIfThere(this, label, false); delete label; - label = 0; + label = nullptr; imgIcon = new RTImage (filename); pack_start(*imgIcon, Gtk::PACK_SHRINK, 0); set_tooltip_markup ("" + labelText + "\n" + tooltipText); @@ -1065,7 +1065,7 @@ void TextOrIcon::switchTo(TOITypes type) if (!label) { removeIfThere(this, imgIcon, false); delete imgIcon; - imgIcon = 0; + imgIcon = nullptr; label = new Gtk::Label (labelText, Gtk::ALIGN_CENTER); pack_start(*label, Gtk::PACK_EXPAND_WIDGET, 0); set_tooltip_markup (tooltipText); @@ -1080,11 +1080,35 @@ void TextOrIcon::switchTo(TOITypes type) BackBuffer::BackBuffer() : x(0), y(0), w(0), h(0), offset(0, 0), dirty(true) {} +void BackBuffer::setDestPosition(int x, int y) +{ + // values will be clamped when used... + this->x = x; + this->y = y; +} + void BackBuffer::setSrcOffset(int x, int y) { // values will be clamped when used... - offset.x = x; - offset.y = y; + offset.set(x, y); +} + +void BackBuffer::setSrcOffset(const rtengine::Coord &newOffset) +{ + // values will be clamped when used... + offset = newOffset; +} + +void BackBuffer::getSrcOffset(int &x, int &y) +{ + // values will be clamped when used... + offset.get(x, y); +} + +void BackBuffer::getSrcOffset(rtengine::Coord &offset) +{ + // values will be clamped when used... + offset = this->offset; } // Note: newW & newH must be > 0 @@ -1092,12 +1116,16 @@ bool BackBuffer::setDrawRectangle(Glib::RefPtr window, int newX, in { assert(newW && newH); - bool newSize = w != newW || h != newH; + bool newSize = (newW > 0 && w != newW) || (newH > 0 && h != newH); x = newX; y = newY; - w = newW; - h = newH; + if (newH > 0) { + w = newW; + } + if (newH > 0) { + h = newH; + } // WARNING: we're assuming that the surface type won't change during all the execution time of RT. I guess it may be wrong when the user change the gfx card display settings!? if (updateBackBufferSize && newSize && window) { @@ -1113,14 +1141,18 @@ bool BackBuffer::setDrawRectangle(Glib::RefPtr window, int newX, in // Note: newW & newH must be > 0 bool BackBuffer::setDrawRectangle(Cairo::Format format, int newX, int newY, int newW, int newH, bool updateBackBufferSize) { - assert(!newW && !newH); + assert(newW && newH); - bool newSize = w != newW || h != newH; + bool newSize = (newW > 0 && w != newW) || (newH > 0 && h != newH); x = newX; y = newY; - w = newW; - h = newH; + if (newH > 0) { + w = newW; + } + if (newH > 0) { + h = newH; + } // WARNING: we're assuming that the surface type won't change during all the execution time of RT. I guess it may be wrong when the user change the gfx card display settings!? if (updateBackBufferSize && newSize) { @@ -1136,7 +1168,7 @@ bool BackBuffer::setDrawRectangle(Cairo::Format format, int newX, int newY, int /* * Copy the backbuffer to a Gdk::Window */ -void BackBuffer::copySurface(Glib::RefPtr window, GdkRectangle *rectangle) +void BackBuffer::copySurface(Glib::RefPtr &window, GdkRectangle *rectangle) { if (surface && window) { // TODO: look out if window can be different on each call, and if not, store a reference to the window @@ -1190,7 +1222,7 @@ void BackBuffer::copySurface(BackBuffer *destBackBuffer, GdkRectangle *rectangle /* * Copy the BackBuffer to another Cairo::Surface */ -void BackBuffer::copySurface(Cairo::RefPtr destSurface, GdkRectangle *rectangle) +void BackBuffer::copySurface(Cairo::RefPtr &destSurface, GdkRectangle *rectangle) { if (surface && destSurface) { // compute the source offset @@ -1212,3 +1244,23 @@ void BackBuffer::copySurface(Cairo::RefPtr destSurface, Gdk } } +void BackBuffer::copySurface(Cairo::RefPtr &context, GdkRectangle *rectangle) +{ + if (surface && context) { + // compute the source offset + int offsetX = rtengine::LIM(offset.x, 0, surface->get_width()); + int offsetY = rtengine::LIM(offset.y, 0, surface->get_height()); + + // now copy the off-screen Surface to the destination Surface + context->set_source(surface, x - offsetX, y - offsetY); + context->set_line_width(0.); + + if (rectangle) { + context->rectangle(rectangle->x, rectangle->y, rectangle->width, rectangle->height); + } else { + context->rectangle(x, y, w, h); + } + + context->fill(); + } +} diff --git a/rtgui/guiutils.h b/rtgui/guiutils.h index f91bb0245..b8e058eb4 100644 --- a/rtgui/guiutils.h +++ b/rtgui/guiutils.h @@ -21,6 +21,7 @@ #include #include "../rtengine/rtengine.h" +#include "../rtengine/coord.h" #include #include @@ -79,16 +80,24 @@ public: class ConnectionBlocker { public: - ConnectionBlocker (sigc::connection& connection) : connection (connection) + explicit ConnectionBlocker (Gtk::Widget *associatedWidget, sigc::connection& connection) : connection (associatedWidget ? &connection : nullptr) { - wasBlocked = connection.block(); + if (this->connection) { + wasBlocked = connection.block(); + } + } + explicit ConnectionBlocker (sigc::connection& connection) : connection (&connection) + { + wasBlocked = connection.block(); } ~ConnectionBlocker () { - connection.block(wasBlocked); + if (connection) { + connection->block(wasBlocked); + } } private: - sigc::connection& connection; + sigc::connection *connection; bool wasBlocked; }; @@ -101,7 +110,7 @@ private: Gtk::Container *pC; public: - ExpanderBox( Gtk::Container *p); + explicit ExpanderBox( Gtk::Container *p); ~ExpanderBox( ) { delete pC; @@ -382,33 +391,6 @@ public: } }; -/** - * @brief Handle point coordinates - */ -template -class Point -{ -public: - T x, y; - Point() - { - x = T(0); - y = T(0); - } - - Point(T coordX, T coordY) - { - x = coordX; - y = coordY; - } - - void setCoords(T coordX, T coordY) - { - x = coordX; - y = coordY; - } -}; - /** * @brief Handle backbuffers as automatically as possible */ @@ -417,7 +399,7 @@ class BackBuffer protected: int x, y, w, h; // Rectangle where the colored bar has to be drawn - Point offset; // Offset of the source region to draw, relative to the top left corner + rtengine::Coord offset; // Offset of the source region to draw, relative to the top left corner Cairo::RefPtr surface; bool dirty; // mean that the Surface has to be (re)allocated @@ -426,13 +408,19 @@ public: // set the destination drawing rectangle; return true if the dimensions are different // Note: newW & newH must be > 0 - bool setDrawRectangle(Glib::RefPtr window, int newX, int newY, int newW, int newH, bool updateBackBufferSize = true); - bool setDrawRectangle(Cairo::Format format, int newX, int newY, int newW, int newH, bool updateBackBufferSize = true); + bool setDrawRectangle(Glib::RefPtr window, int newX, int newY, int newW=-1, int newH=-1, bool updateBackBufferSize = true); + bool setDrawRectangle(Cairo::Format format, int newX, int newY, int newW=-1, int newH=-1, bool updateBackBufferSize = true); + // set the destination drawing location, do not modify other parameters like size and offset. Use setDrawRectangle to set all parameters at the same time + void setDestPosition(int x, int y); void setSrcOffset(int x, int y); + void setSrcOffset(const rtengine::Coord &newOffset); + void getSrcOffset(int &x, int &y); + void getSrcOffset(rtengine::Coord &offset); - void copySurface(Glib::RefPtr window, GdkRectangle *rectangle = NULL); - void copySurface(BackBuffer *destBackBuffer, GdkRectangle *rectangle = NULL); - void copySurface(Cairo::RefPtr destSurface, GdkRectangle *rectangle = NULL); + void copySurface(Glib::RefPtr &window, GdkRectangle *rectangle = nullptr); + void copySurface(BackBuffer *destBackBuffer, GdkRectangle *rectangle = nullptr); + void copySurface(Cairo::RefPtr &destSurface, GdkRectangle *rectangle = nullptr); + void copySurface(Cairo::RefPtr &context, GdkRectangle *rectangle = nullptr); void setDirty(bool isDirty) { @@ -449,7 +437,7 @@ public: // you have to check if the surface is created thanks to surfaceCreated before starting to draw on it bool surfaceCreated() { - return surface; + return static_cast(surface); } Cairo::RefPtr getSurface() { diff --git a/rtgui/histogrampanel.cc b/rtgui/histogrampanel.cc index 9c8163c8e..f674b8951 100644 --- a/rtgui/histogrampanel.cc +++ b/rtgui/histogrampanel.cc @@ -26,9 +26,9 @@ #include "../rtengine/improccoordinator.h" #include "../rtengine/color.h" #include "../rtengine/opthelper.h" +#include "../rtengine/iccstore.h" using namespace rtengine; -extern Glib::ustring argv0; extern Options options; @@ -215,7 +215,7 @@ void HistogramPanel::resized (Gtk::Allocation& req) histogramArea->renderHistogram (); histogramArea->queue_draw (); - if (histogramRGBArea->getFreeze() == true) { + if (histogramRGBArea->getFreeze()) { histogramRGBArea->updateFreeze(false); // set histogramRGBArea invalid; histogramRGBArea->renderRGBMarks(-1, -1, -1); @@ -305,9 +305,9 @@ void HistogramPanel::setHistRGBInvalid () // "Freeze" is not a button, but a RMB-click, so this is not in the RGBV-Toggle method void HistogramPanel::toggleFreeze () { - if (histogramRGBArea->getFreeze() == true) { + if (histogramRGBArea->getFreeze()) { histogramRGBArea->updateFreeze(false); - } else if (histogramRGBArea->getShow() == true) { + } else if (histogramRGBArea->getShow()) { histogramRGBArea->updateFreeze(true); } @@ -353,7 +353,8 @@ void HistogramPanel::toggle_button_full () // // HistogramRGBArea HistogramRGBArea::HistogramRGBArea () ://needChroma unactive by default - frozen(false), valid(false), needRed(true), needGreen(true), needBlue(true), needLuma(true), rawMode(false), showMode(options.histogramBar), barDisplayed(options.histogramBar), needChroma(false) + val(0), r(0), g(0), b(0), frozen(false), valid(false), needRed(true), needGreen(true), needBlue(true), needLuma(true), rawMode(false), + showMode(options.histogramBar), barDisplayed(options.histogramBar), needChroma(false), parent(nullptr) { harih = new HistogramRGBAreaIdleHelper; diff --git a/rtgui/histogrampanel.h b/rtgui/histogrampanel.h index 16a0747e3..79fe4a249 100644 --- a/rtgui/histogrampanel.h +++ b/rtgui/histogrampanel.h @@ -144,7 +144,7 @@ protected: public: - HistogramArea(FullModeListener *fml = NULL); + explicit HistogramArea(FullModeListener *fml = nullptr); ~HistogramArea(); void renderHistogram (); diff --git a/rtgui/history.cc b/rtgui/history.cc index fa1ba372b..4deb7b64a 100644 --- a/rtgui/history.cc +++ b/rtgui/history.cc @@ -25,7 +25,7 @@ using namespace rtengine::procparams; Glib::ustring eventDescrArray[NUMOFEVENTS]; -History::History (bool bookmarkSupport) : blistener(NULL), tpc (NULL), bmnum (1) +History::History (bool bookmarkSupport) : blistener(nullptr), tpc (nullptr), bmnum (1) { blistenerLock = false; // sets default that the Before preview will not be locked @@ -165,7 +165,7 @@ void History::historySelectionChanged () tpc->profileChange (&pp, EvHistoryBrowsed, row[historyColumns.text], ¶msEdited); } - if (blistener && blistenerLock == false) { + if (blistener && !blistenerLock) { Gtk::TreeModel::Path path = historyModel->get_path (iter); path.prev (); iter = historyModel->get_iter (path); @@ -251,9 +251,9 @@ void History::procParamsChanged (ProcParams* params, ProcEvent ev, Glib::ustring selection->select (newrow); } - if (blistener && row && blistenerLock == false) { + if (blistener && row && !blistenerLock) { blistener->historyBeforeLineChanged (row[historyColumns.params]); - } else if (blistener && size == 0 && blistenerLock == false) { + } else if (blistener && size == 0 && !blistenerLock) { blistener->historyBeforeLineChanged (newrow[historyColumns.params]); } } diff --git a/rtgui/history.h b/rtgui/history.h index 760444b5f..e3d18354e 100644 --- a/rtgui/history.h +++ b/rtgui/history.h @@ -95,7 +95,7 @@ protected: public: - History (bool bookmarkSupport = true); + explicit History (bool bookmarkSupport = true); void setProfileChangeListener (ProfileChangeListener* tpc_) { @@ -107,7 +107,7 @@ public: } // pparamschangelistener interface - void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = NULL); + void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = nullptr); void clearParamChanges (); void historySelectionChanged (); diff --git a/rtgui/hsvequalizer.h b/rtgui/hsvequalizer.h index 939cd1904..d02cc378c 100644 --- a/rtgui/hsvequalizer.h +++ b/rtgui/hsvequalizer.h @@ -44,8 +44,8 @@ public: HSVEqualizer (); virtual ~HSVEqualizer (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void curveChanged (CurveEditor* ce); //void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL); void setBatchMode (bool batchMode); diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index cc2cbc039..68663ed7e 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -29,7 +29,7 @@ using namespace rtengine::procparams; extern Options options; -ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunchanged(NULL), icmplistener(NULL), lastRefFilename(""), camName("") +ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunchanged(nullptr), icmplistener(nullptr), lastRefFilename(""), camName("") { isBatchMode = lastToneCurve = lastApplyLookTable = lastApplyBaselineExposureOffset = lastApplyHueSatMap = lastBlendCMSMatrix = lastgamfree = false; @@ -193,15 +193,21 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch Gtk::HBox *riHBox = Gtk::manage ( new Gtk::HBox()); Gtk::Label* outputIntentLbl = Gtk::manage (new Gtk::Label(M("TP_ICM_PROFILEINTENT")+":")); riHBox->pack_start (*outputIntentLbl, Gtk::PACK_SHRINK); - ointent = Gtk::manage (new MyComboBoxText ()); - riHBox->pack_start (*ointent, Gtk::PACK_EXPAND_WIDGET); - ointent->append_text (M("PREFERENCES_INTENT_PERCEPTUAL")); - ointent->append_text (M("PREFERENCES_INTENT_RELATIVE")); - ointent->append_text (M("PREFERENCES_INTENT_SATURATION")); - ointent->append_text (M("PREFERENCES_INTENT_ABSOLUTE")); - ointent->set_active (1); + ointent = Gtk::manage (new PopUpButton ()); + ointent->addEntry("intent-perceptual.png", M("PREFERENCES_INTENT_PERCEPTUAL")); + ointent->addEntry("intent-relative.png", M("PREFERENCES_INTENT_RELATIVE")); + ointent->addEntry("intent-saturation.png", M("PREFERENCES_INTENT_SATURATION")); + ointent->addEntry("intent-absolute.png", M("PREFERENCES_INTENT_ABSOLUTE")); + ointent->setSelected (1); + ointent->show(); + riHBox->pack_start (*ointent->buttonGroup, Gtk::PACK_EXPAND_PADDING); oVBox->pack_start(*riHBox, Gtk::PACK_SHRINK); + // Black Point Compensation + obpc = Gtk::manage(new Gtk::CheckButton((M("TP_ICM_BPC")))); + obpc->set_active (true); + oVBox->pack_start(*obpc, Gtk::PACK_SHRINK); + // Output gamma Gtk::HBox* gaHBox = Gtk::manage (new Gtk::HBox ()); @@ -295,6 +301,7 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch wgamma->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::gpChanged) ); dcpIll->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::dcpIlluminantChanged) ); + obpcconn = obpc->signal_toggled().connect( sigc::mem_fun(*this, &ICMPanel::oBPCChanged) ); gamcsconn = freegamma->signal_toggled().connect ( sigc::mem_fun(*this, &ICMPanel::GamChanged)); tcurveconn = ckbToneCurve->signal_toggled().connect ( sigc::mem_fun(*this, &ICMPanel::toneCurveChanged)); ltableconn = ckbApplyLookTable->signal_toggled().connect ( sigc::mem_fun(*this, &ICMPanel::applyLookTableChanged)); @@ -313,6 +320,31 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch show_all (); } +void ICMPanel::updateRenderingIntent (const Glib::ustring &profile) { + const uint8_t supportedIntents = rtengine::iccStore->getOutputIntents (profile); + const bool supportsPerceptual = supportedIntents & 1 << INTENT_PERCEPTUAL; + const bool supportsRelative = supportedIntents & 1 << INTENT_RELATIVE_COLORIMETRIC; + const bool supportsSaturation = supportedIntents & 1 << INTENT_SATURATION; + const bool supportsAbsolute = supportedIntents & 1 << INTENT_ABSOLUTE_COLORIMETRIC; + + //printf("Intents: %d / Perceptual: %d Relative: %d Saturation: %d Absolute: %d\n", supportedIntents, supportsPerceptual, supportsRelative, supportsSaturation, supportsAbsolute); + + if (!profile.empty() && (supportsPerceptual || supportsRelative || supportsSaturation || supportsAbsolute)) { + ointent->set_sensitive (true); + ointent->setItemSensitivity(0, supportsPerceptual); + ointent->setItemSensitivity(1, supportsRelative); + ointent->setItemSensitivity(2, supportsSaturation); + ointent->setItemSensitivity(3, supportsAbsolute); + } else { + ointent->setItemSensitivity(0, true); + ointent->setItemSensitivity(1, true); + ointent->setItemSensitivity(2, true); + ointent->setItemSensitivity(3, true); + ointent->set_sensitive (false); + ointent->setSelected (1); + } +} + void ICMPanel::updateDCP (int dcpIlluminant, Glib::ustring dcp_name) { @@ -358,7 +390,7 @@ void ICMPanel::updateDCP (int dcpIlluminant, Glib::ustring dcp_name) dcpIll->set_sensitive (false); dcpFrame->set_sensitive(false); - DCPProfile* dcp = NULL; + DCPProfile* dcp = nullptr; if(dcp_name == "(cameraICC)") { dcp = DCPStore::getInstance()->getStdProfile(camName); @@ -455,6 +487,7 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) disableListener (); + obpcconn.block (true); ipc.block (true); gamcsconn.block (true); tcurveconn.block(true); @@ -469,36 +502,50 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) if (pp->icm.input == "(none)") { inone->set_active (true); - ckbBlendCMSMatrix->set_sensitive (false); + if (!batchMode) { + ckbBlendCMSMatrix->set_sensitive (false); + } updateDCP(pp->icm.dcpIlluminant, ""); } else if (pp->icm.input == "(embedded)" || ((pp->icm.input == "(camera)" || pp->icm.input == "") && icamera->get_state() == Gtk::STATE_INSENSITIVE)) { iembedded->set_active (true); - ckbBlendCMSMatrix->set_sensitive (false); + if (!batchMode) { + ckbBlendCMSMatrix->set_sensitive (false); + } updateDCP(pp->icm.dcpIlluminant, ""); } else if ((pp->icm.input == "(cameraICC)") && icameraICC->get_state() != Gtk::STATE_INSENSITIVE) { icameraICC->set_active (true); - ckbBlendCMSMatrix->set_sensitive (true); + if (!batchMode) { + ckbBlendCMSMatrix->set_sensitive (true); + } updateDCP(pp->icm.dcpIlluminant, "(cameraICC)"); } else if ((pp->icm.input == "(cameraICC)") && icamera->get_state() != Gtk::STATE_INSENSITIVE && icameraICC->get_state() == Gtk::STATE_INSENSITIVE) { // this is the case when (cameraICC) is instructed by packaged profiles, but ICC file is not found // therefore falling back UI to explicitly reflect the (camera) option icamera->set_active (true); - ckbBlendCMSMatrix->set_sensitive (false); + if (!batchMode) { + ckbBlendCMSMatrix->set_sensitive (false); + } updateDCP(pp->icm.dcpIlluminant, ""); } else if ((pp->icm.input == "(cameraICC)") && icamera->get_state() == Gtk::STATE_INSENSITIVE && icameraICC->get_state() == Gtk::STATE_INSENSITIVE) { // If neither (camera) nor (cameraICC) are available, as is the case when loading a non-raw, activate (embedded). iembedded->set_active (true); - ckbBlendCMSMatrix->set_sensitive (false); + if (!batchMode) { + ckbBlendCMSMatrix->set_sensitive (false); + } updateDCP(pp->icm.dcpIlluminant, "(cameraICC)"); } else if ((pp->icm.input == "(camera)" || pp->icm.input == "") && icamera->get_state() != Gtk::STATE_INSENSITIVE) { icamera->set_active (true); - ckbBlendCMSMatrix->set_sensitive (false); + if (!batchMode) { + ckbBlendCMSMatrix->set_sensitive (false); + } updateDCP(pp->icm.dcpIlluminant, ""); } else { ifromfile->set_active (true); oldip = pp->icm.input.substr(5); // cut of "file:" ipDialog->set_filename (pp->icm.input.substr(5)); - ckbBlendCMSMatrix->set_sensitive (true); + if (!batchMode) { + ckbBlendCMSMatrix->set_sensitive (true); + } updateDCP(pp->icm.dcpIlluminant, pp->icm.input.substr(5)); } @@ -514,8 +561,9 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) if (onames->get_active_row_number() == -1) { onames->set_active_text (M("TP_ICM_NOICM")); } - ointent->set_active(pp->icm.outputIntent); + ointent->setSelected (pp->icm.outputIntent); + obpc->set_active (pp->icm.outputBPC); ckbToneCurve->set_active (pp->icm.toneCurve); lastToneCurve = pp->icm.toneCurve; ckbApplyLookTable->set_active (pp->icm.applyLookTable); @@ -528,22 +576,29 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) ckbBlendCMSMatrix->set_active (pp->icm.blendCMSMatrix); lastBlendCMSMatrix = pp->icm.blendCMSMatrix; - onames->set_sensitive(wgamma->get_active_row_number() == 0 || freegamma->get_active()); //"default" - wgamma->set_sensitive(!freegamma->get_active()); - freegamma->set_active (pp->icm.freegamma); lastgamfree = pp->icm.freegamma; + if (!batchMode) { + onames->set_sensitive(wgamma->get_active_row_number() == 0 && !pp->icm.freegamma); //"default" + wgamma->set_sensitive(!pp->icm.freegamma); + gampos->set_sensitive(pp->icm.freegamma); + slpos->set_sensitive(pp->icm.freegamma); + updateRenderingIntent(pp->icm.output); + } + gampos->setValue (pp->icm.gampos); slpos->setValue (pp->icm.slpos); if (pedited) { iunchanged->set_active (!pedited->icm.input); + obpc->set_inconsistent(!pedited->icm.outputBPC); ckbToneCurve->set_inconsistent(!pedited->icm.toneCurve); ckbApplyLookTable->set_inconsistent(!pedited->icm.applyLookTable); ckbApplyBaselineExposureOffset->set_inconsistent(!pedited->icm.applyBaselineExposureOffset); ckbApplyHueSatMap->set_inconsistent(!pedited->icm.applyHueSatMap); ckbBlendCMSMatrix->set_inconsistent(!pedited->icm.blendCMSMatrix); + freegamma->set_inconsistent (!pedited->icm.freegamma); if (!pedited->icm.working) { wnames->set_active_text(M("GENERAL_UNCHANGED")); @@ -554,7 +609,7 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) } if (!pedited->icm.outputIntent) { - ointent->set_active_text(M("GENERAL_UNCHANGED")); + ointent->setSelected (4); } if (!pedited->icm.dcpIlluminant) { @@ -578,6 +633,7 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) hsmconn.block(false); gamcsconn.block (false); ipc.block (false); + obpcconn.block (false); enableListener (); } @@ -617,7 +673,7 @@ void ICMPanel::write (ProcParams* pp, ParamsEdited* pedited) pp->icm.output = onames->get_active_text(); } - int ointentVal = ointent->get_active_row_number(); + int ointentVal = ointent->getSelected (); if (ointentVal >= 0 && ointentVal < RI__COUNT) { pp->icm.outputIntent = static_cast(ointentVal); } else { @@ -626,7 +682,7 @@ void ICMPanel::write (ProcParams* pp, ParamsEdited* pedited) pp->icm.freegamma = freegamma->get_active(); - DCPProfile* dcp = NULL; + DCPProfile* dcp = nullptr; if (ifromfile->get_active() && pp->icm.input.substr(0, 5) == "file:" && DCPStore::getInstance()->isValidDCPFileName(pp->icm.input.substr(5))) { dcp = DCPStore::getInstance()->getProfile(pp->icm.input.substr(5)); @@ -655,12 +711,14 @@ void ICMPanel::write (ProcParams* pp, ParamsEdited* pedited) pp->icm.blendCMSMatrix = ckbBlendCMSMatrix->get_active (); pp->icm.gampos = (double) gampos->getValue(); pp->icm.slpos = (double) slpos->getValue(); + pp->icm.outputBPC = obpc->get_active (); if (pedited) { pedited->icm.input = !iunchanged->get_active (); pedited->icm.working = wnames->get_active_text() != M("GENERAL_UNCHANGED"); pedited->icm.output = onames->get_active_text() != M("GENERAL_UNCHANGED"); - pedited->icm.outputIntent = ointent->get_active_text() != M("GENERAL_UNCHANGED"); + pedited->icm.outputIntent = ointent->getSelected () < 4; + pedited->icm.outputBPC = !obpc->get_inconsistent (); pedited->icm.dcpIlluminant = dcpIll->get_active_text() != M("GENERAL_UNCHANGED"); pedited->icm.toneCurve = !ckbToneCurve->get_inconsistent (); pedited->icm.applyLookTable = !ckbApplyLookTable->get_inconsistent (); @@ -697,7 +755,7 @@ void ICMPanel::setAdjusterBehavior (bool gammaadd, bool slopeadd) void ICMPanel::adjusterChanged (Adjuster* a, double newval) { - if (listener && freegamma->get_active()) { + if (listener && (freegamma->get_active() || batchMode)) { Glib::ustring costr = Glib::ustring::format (std::setw(3), std::fixed, std::setprecision(2), newval); @@ -735,7 +793,7 @@ void ICMPanel::dcpIlluminantChanged() void ICMPanel::toneCurveChanged() { - if (batchMode) { + if (multiImage) { if (ckbToneCurve->get_inconsistent()) { ckbToneCurve->set_inconsistent (false); tcurveconn.block (true); @@ -749,13 +807,19 @@ void ICMPanel::toneCurveChanged() } if (listener) { - listener->panelChanged (EvDCPToneCurve, ckbToneCurve->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); + if (ckbToneCurve->get_inconsistent()) { + listener->panelChanged (EvDCPToneCurve, M("GENERAL_UNCHANGED")); + } else if (ckbToneCurve->get_active()) { + listener->panelChanged (EvDCPToneCurve, M("GENERAL_ENABLED")); + } else { + listener->panelChanged (EvDCPToneCurve, M("GENERAL_DISABLED")); + } } } void ICMPanel::applyLookTableChanged() { - if (batchMode) { + if (multiImage) { if (ckbApplyLookTable->get_inconsistent()) { ckbApplyLookTable->set_inconsistent (false); ltableconn.block (true); @@ -769,13 +833,19 @@ void ICMPanel::applyLookTableChanged() } if (listener) { - listener->panelChanged (EvDCPApplyLookTable, ckbApplyLookTable->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); + if (ckbApplyLookTable->get_inconsistent()) { + listener->panelChanged (EvDCPApplyLookTable, M("GENERAL_UNCHANGED")); + } else if (ckbApplyLookTable->get_active()) { + listener->panelChanged (EvDCPApplyLookTable, M("GENERAL_ENABLED")); + } else { + listener->panelChanged (EvDCPApplyLookTable, M("GENERAL_DISABLED")); + } } } void ICMPanel::applyBaselineExposureOffsetChanged() { - if (batchMode) { + if (multiImage) { if (ckbApplyBaselineExposureOffset->get_inconsistent()) { ckbApplyBaselineExposureOffset->set_inconsistent (false); beoconn.block (true); @@ -789,13 +859,19 @@ void ICMPanel::applyBaselineExposureOffsetChanged() } if (listener) { - listener->panelChanged (EvDCPApplyBaselineExposureOffset, ckbApplyBaselineExposureOffset->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); + if (ckbApplyBaselineExposureOffset->get_inconsistent()) { + listener->panelChanged (EvDCPApplyBaselineExposureOffset, M("GENERAL_UNCHANGED")); + } else if (ckbApplyBaselineExposureOffset->get_active()) { + listener->panelChanged (EvDCPApplyBaselineExposureOffset, M("GENERAL_ENABLED")); + } else { + listener->panelChanged (EvDCPApplyBaselineExposureOffset, M("GENERAL_DISABLED")); + } } } void ICMPanel::applyHueSatMapChanged() { - if (batchMode) { + if (multiImage) { if (ckbApplyHueSatMap->get_inconsistent()) { ckbApplyHueSatMap->set_inconsistent (false); hsmconn.block (true); @@ -809,7 +885,13 @@ void ICMPanel::applyHueSatMapChanged() } if (listener) { - listener->panelChanged (EvDCPApplyHueSatMap, ckbApplyHueSatMap->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); + if (ckbApplyHueSatMap->get_inconsistent()) { + listener->panelChanged (EvDCPApplyHueSatMap, M("GENERAL_UNCHANGED")); + } else if (ckbApplyHueSatMap->get_active()) { + listener->panelChanged (EvDCPApplyHueSatMap, M("GENERAL_ENABLED")); + } else { + listener->panelChanged (EvDCPApplyHueSatMap, M("GENERAL_DISABLED")); + } } } @@ -846,7 +928,7 @@ void ICMPanel::ipChanged () void ICMPanel::blendCMSMatrixChanged() { - if (batchMode) { + if (multiImage) { if (ckbBlendCMSMatrix->get_inconsistent()) { ckbBlendCMSMatrix->set_inconsistent (false); blendcmsconn.block (true); @@ -860,13 +942,19 @@ void ICMPanel::blendCMSMatrixChanged() } if (listener) { - listener->panelChanged (EvBlendCMSMatrix, ckbBlendCMSMatrix->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); + if (ckbBlendCMSMatrix->get_inconsistent()) { + listener->panelChanged (EvBlendCMSMatrix, M("GENERAL_UNCHANGED")); + } else if (ckbBlendCMSMatrix->get_active()) { + listener->panelChanged (EvBlendCMSMatrix, M("GENERAL_ENABLED")); + } else { + listener->panelChanged (EvBlendCMSMatrix, M("GENERAL_DISABLED")); + } } } void ICMPanel::GamChanged() { - if (batchMode) { + if (multiImage) { if (freegamma->get_inconsistent()) { freegamma->set_inconsistent (false); gamcsconn.block (true); @@ -880,31 +968,90 @@ void ICMPanel::GamChanged() } if (listener) { - if (freegamma->get_active()) { + if (freegamma->get_inconsistent()) { + listener->panelChanged (EvGAMFREE, M("GENERAL_UNCHANGED")); + } + else if (freegamma->get_active()) { listener->panelChanged (EvGAMFREE, M("GENERAL_ENABLED")); - onames->set_sensitive(!freegamma->get_active());//disabled choice - wgamma->set_sensitive(!freegamma->get_active()); + if (!batchMode) { + onames->set_sensitive(false);//disabled choice + wgamma->set_sensitive(false); + gampos->set_sensitive(true); + slpos->set_sensitive(true); + } } else { listener->panelChanged (EvGAMFREE, M("GENERAL_DISABLED")); - onames->set_sensitive(!freegamma->get_active() && wgamma->get_active_row_number() == 0); - wgamma->set_sensitive(!freegamma->get_active()); + if (!batchMode) { + onames->set_sensitive(wgamma->get_active_row_number() == 0); + wgamma->set_sensitive(true); + gampos->set_sensitive(false); + slpos->set_sensitive(false); + } } } } void ICMPanel::opChanged () { + if (!batchMode) { + updateRenderingIntent(onames->get_active_text()); + } if (listener) { listener->panelChanged (EvOProfile, onames->get_active_text()); } } -void ICMPanel::oiChanged () +void ICMPanel::oiChanged (int n) { if (listener) { - listener->panelChanged (EvOIntent, ointent->get_active_text()); + Glib::ustring str; + switch (n) { + case 0: + str = M("PREFERENCES_INTENT_PERCEPTUAL"); + break; + case 1: + str = M("PREFERENCES_INTENT_RELATIVE"); + break; + case 2: + str = M("PREFERENCES_INTENT_SATURATION"); + break; + case 3: + str = M("PREFERENCES_INTENT_ABSOLUTE"); + break; + case 4: + default: + str = M("GENERAL_UNCHANGED"); + break; + } + listener->panelChanged (EvOIntent, str); + } +} + +void ICMPanel::oBPCChanged () +{ + if (multiImage) { + if (obpc->get_inconsistent()) { + obpc->set_inconsistent (false); + obpcconn.block (true); + obpc->set_active (false); + obpcconn.block (false); + } else if (lastobpc) { + obpc->set_inconsistent (true); + } + + lastobpc = obpc->get_active (); + } + + if (listener) { + if (obpc->get_inconsistent()) { + listener->panelChanged (EvOBPCompens, M("GENERAL_UNCHANGED")); + } else if (obpc->get_active()) { + listener->panelChanged (EvOBPCompens, M("GENERAL_ENABLED")); + } else { + listener->panelChanged (EvOBPCompens, M("GENERAL_DISABLED")); + } } } @@ -917,7 +1064,7 @@ void ICMPanel::setRawMeta (bool raw, const rtengine::ImageData* pMeta) iembedded->set_active (!raw); icamera->set_sensitive (raw); camName = pMeta->getCamera(); - icameraICC->set_sensitive (raw && (iccStore->getStdProfile(pMeta->getCamera()) != NULL || DCPStore::getInstance()->getStdProfile(pMeta->getCamera()) != NULL)); + icameraICC->set_sensitive (raw && (iccStore->getStdProfile(pMeta->getCamera()) != nullptr || DCPStore::getInstance()->getStdProfile(pMeta->getCamera()) != nullptr)); iembedded->set_sensitive (!raw); enableListener (); @@ -1006,7 +1153,8 @@ void ICMPanel::setBatchMode (bool batchMode) iVBox->reorder_child (*iunchanged, 5); removeIfThere (this, saveRef); onames->append_text (M("GENERAL_UNCHANGED")); - ointent->append_text (M("GENERAL_UNCHANGED")); + ointent->addEntry("unchanged-22.png", M("GENERAL_UNCHANGED")); + ointent->show(); wnames->append_text (M("GENERAL_UNCHANGED")); wgamma->append_text (M("GENERAL_UNCHANGED")); dcpIll->append_text (M("GENERAL_UNCHANGED")); diff --git a/rtgui/icmpanel.h b/rtgui/icmpanel.h index 640cca5a2..caab1771f 100644 --- a/rtgui/icmpanel.h +++ b/rtgui/icmpanel.h @@ -25,6 +25,7 @@ #include "guiutils.h" #include "toolpanel.h" +#include "popupbutton.h" #include "../rtengine/imagedata.h" class ICMPanelListener @@ -53,6 +54,8 @@ protected: sigc::connection beoconn; bool lastApplyHueSatMap; sigc::connection hsmconn; + bool lastobpc; + sigc::connection obpcconn; bool lastBlendCMSMatrix; bool isBatchMode; sigc::connection blendcmsconn; @@ -60,6 +63,7 @@ protected: private: Gtk::VBox * iVBox; + Gtk::CheckButton* obpc; Gtk::CheckButton* freegamma; Gtk::RadioButton* inone; @@ -78,7 +82,7 @@ private: MyComboBoxText* wgamma; MyComboBoxText* onames; - MyComboBoxText* ointent; + PopUpButton* ointent; Gtk::RadioButton* ofromdir; Gtk::RadioButton* ofromfile; Gtk::RadioButton* iunchanged; @@ -95,19 +99,21 @@ private: Glib::ustring lastRefFilename; Glib::ustring camName; void updateDCP(int dcpIlluminant, Glib::ustring dcp_name); + void updateRenderingIntent (const Glib::ustring &profile); public: ICMPanel (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void adjusterChanged (Adjuster* a, double newval); void setAdjusterBehavior (bool gammaadd, bool slopeadd); void wpChanged (); void opChanged (); - void oiChanged (); + void oiChanged (int n); + void oBPCChanged (); void ipChanged (); void gpChanged (); void GamChanged (); diff --git a/rtgui/ilabel.cc b/rtgui/ilabel.cc index 591564305..2c7edfd80 100644 --- a/rtgui/ilabel.cc +++ b/rtgui/ilabel.cc @@ -18,7 +18,7 @@ */ #include "ilabel.h" -ILabel::ILabel (Glib::ustring lab) : label(lab) {} +ILabel::ILabel (const Glib::ustring &lab) : label(lab) {} void ILabel::on_realize() { diff --git a/rtgui/ilabel.h b/rtgui/ilabel.h index aef5eb2ed..82064bd23 100644 --- a/rtgui/ilabel.h +++ b/rtgui/ilabel.h @@ -27,7 +27,7 @@ class ILabel : public Gtk::DrawingArea Glib::ustring label; public: - ILabel (Glib::ustring lab); + explicit ILabel (const Glib::ustring &lab); bool on_expose_event(GdkEventExpose* event); void on_realize(); void on_style_changed (const Glib::RefPtr& style); diff --git a/rtgui/imagearea.cc b/rtgui/imagearea.cc index 0b757d8ec..a8bee4fb3 100644 --- a/rtgui/imagearea.cc +++ b/rtgui/imagearea.cc @@ -29,16 +29,16 @@ ImageArea::ImageArea (ImageAreaPanel* p) : parent(p), firstOpen(true) { infotext = ""; - cropgl = NULL; - pmlistener = NULL; - pmhlistener = NULL; - focusGrabber = NULL; - flawnOverWindow = NULL; - mainCropWindow = NULL; - previewHandler = NULL; + cropgl = nullptr; + pmlistener = nullptr; + pmhlistener = nullptr; + focusGrabber = nullptr; + flawnOverWindow = nullptr; + mainCropWindow = nullptr; + previewHandler = nullptr; showClippedH = false; showClippedS = false; - listener = NULL; + listener = nullptr; zoomPanel = Gtk::manage (new ZoomPanel (this)); indClippedPanel = Gtk::manage (new IndicateClippedPanel (this)); @@ -49,8 +49,8 @@ ImageArea::ImageArea (ImageAreaPanel* p) : parent(p), firstOpen(true) signal_size_allocate().connect( sigc::mem_fun(*this, &ImageArea::on_resized) ); dirty = false; - ipc = NULL; - iLinkedImageArea = NULL; + ipc = nullptr; + iLinkedImageArea = nullptr; } ImageArea::~ImageArea () @@ -88,7 +88,7 @@ void ImageArea::on_resized (Gtk::Allocation& req) { if (ipc && get_width() > 1) { // sometimes on_resize is called in some init state, causing wrong sizes if (!mainCropWindow) { - mainCropWindow = new CropWindow (this, ipc, false, false); + mainCropWindow = new CropWindow (this, false, false); mainCropWindow->setDecorated (false); mainCropWindow->setFitZoomEnabled (true); mainCropWindow->addCropWindowListener (this); @@ -106,10 +106,15 @@ void ImageArea::on_resized (Gtk::Allocation& req) } } -void ImageArea::setImProcCoordinator (rtengine::StagedImageProcessor* ipc_) +rtengine::StagedImageProcessor* ImageArea::getImProcCoordinator() const +{ + return ipc; +} + +void ImageArea::setImProcCoordinator(rtengine::StagedImageProcessor* ipc_) { if( !ipc_ ) { - focusGrabber = NULL; + focusGrabber = nullptr; for (auto cropWin : cropWins) { delete cropWin; @@ -117,7 +122,8 @@ void ImageArea::setImProcCoordinator (rtengine::StagedImageProcessor* ipc_) cropWins.clear(); - mainCropWindow->setObservedCropWin (NULL); + mainCropWindow->deleteColorPickers (); + mainCropWindow->setObservedCropWin (nullptr); } ipc = ipc_; @@ -143,16 +149,43 @@ void ImageArea::setInfoText (Glib::ustring text) infotext = text; Glib::RefPtr context = get_pango_context () ; - Pango::FontDescription fontd = context->get_font_description (); + Pango::FontDescription fontd(get_default_style()->get_font()); + + // update font fontd.set_weight (Pango::WEIGHT_BOLD); fontd.set_size (9 * Pango::SCALE); context->set_font_description (fontd); - ilayout = create_pango_layout(""); + + // create text layout + Glib::RefPtr ilayout = create_pango_layout(""); ilayout->set_markup(text); + + // get size of the text block int iw, ih; ilayout->get_pixel_size (iw, ih); - ipixbuf = Gdk::Pixbuf::create (Gdk::COLORSPACE_RGB, true, 8, iw + 8, ih + 8); - ipixbuf->fill (128); + + // create BackBuffer + iBackBuffer.setDrawRectangle(Cairo::FORMAT_ARGB32, 0, 0, iw + 16, ih + 16, true); + iBackBuffer.setDestPosition(8, 8); + + Cairo::RefPtr cr = iBackBuffer.getContext(); + + // cleaning the back buffer (make it full transparent) + cr->set_source_rgba (0., 0., 0., 0.); + cr->set_operator (Cairo::OPERATOR_CLEAR); + cr->paint (); + cr->set_operator (Cairo::OPERATOR_OVER); + + // paint transparent black background + cr->set_source_rgba (0., 0., 0., 0.5); + cr->paint (); + + // paint text + cr->set_source_rgb (1.0, 1.0, 1.0); + cr->move_to (8, 8); + ilayout->add_to_cairo_context (cr); + cr->fill (); + } void ImageArea::infoEnabled (bool e) @@ -178,7 +211,6 @@ CropWindow* ImageArea::getCropWindow (int x, int y) return cw; } - void ImageArea::redraw () { // dirty prevents multiple updates queued up @@ -188,6 +220,11 @@ void ImageArea::redraw () } } +void ImageArea::switchPickerVisibility (bool isVisible) +{ + redraw(); +} + bool ImageArea::on_expose_event(GdkEventExpose* event) { dirty = false; @@ -196,21 +233,14 @@ bool ImageArea::on_expose_event(GdkEventExpose* event) return true; } - Glib::RefPtr window = get_window(); Cairo::RefPtr cr = get_window()->create_cairo_context(); if (mainCropWindow) { mainCropWindow->expose (cr); } - if (options.showInfo == true && infotext != "") { - int fnw, fnh; - ilayout->get_pixel_size (fnw, fnh); - window->draw_pixbuf (get_style()->get_base_gc (Gtk::STATE_NORMAL), ipixbuf, 0, 0, 4, 4, fnw + 8, fnh + 8, Gdk::RGB_DITHER_NONE, 0, 0); - cr->set_source_rgb (1.0, 1.0, 1.0); - cr->move_to (8, 8); - ilayout->add_to_cairo_context (cr); - cr->fill (); + if (options.showInfo && infotext != "") { + iBackBuffer.copySurface(cr); } for (std::list::reverse_iterator i = cropWins.rbegin(); i != cropWins.rend(); ++i) { @@ -242,7 +272,7 @@ bool ImageArea::on_motion_notify_event (GdkEventMotion* event) cw->pointerMoved (event->state, event->x, event->y); } else if (flawnOverWindow) { flawnOverWindow->flawnOver(false); - flawnOverWindow = NULL; + flawnOverWindow = nullptr; } } @@ -269,18 +299,8 @@ bool ImageArea::on_scroll_event (GdkEventScroll* event) { CropWindow* cw = getCropWindow (event->x, event->y); - if (cw) { - int newCenterX = (int)event->x; - int newCenterY = (int)event->y; - - cw->screenCoordToImage(newCenterX, newCenterY, newCenterX, newCenterY); - - if (event->direction == GDK_SCROLL_UP && !cw->isMaxZoom()) { - cw->zoomIn (true, newCenterX, newCenterY); - } else if (!cw->isMinZoom()) { - cw->zoomOut (true, newCenterX, newCenterY); - } + cw->scroll (event->state, event->direction, event->x, event->y); } return true; @@ -306,7 +326,7 @@ bool ImageArea::on_leave_notify_event (GdkEventCrossing* event) { if (flawnOverWindow) { flawnOverWindow->flawnOver(false); - flawnOverWindow = NULL; + flawnOverWindow = nullptr; } if (focusGrabber) { @@ -355,9 +375,9 @@ void ImageArea::unsubscribe() EditDataProvider::unsubscribe(); // Ask the Crops to free-up edit mode buffers - mainCropWindow->setEditSubscriber(NULL); + mainCropWindow->setEditSubscriber(nullptr); for (auto cropWin : cropWins) { - cropWin->setEditSubscriber(NULL); + cropWin->setEditSubscriber(nullptr); } setToolHand(); @@ -394,7 +414,7 @@ void ImageArea::grabFocus (CropWindow* cw) void ImageArea::unGrabFocus () { - focusGrabber = NULL; + focusGrabber = nullptr; } void ImageArea::addCropWindow () @@ -403,7 +423,7 @@ void ImageArea::addCropWindow () return; // if called but no image is loaded, it would crash } - CropWindow* cw = new CropWindow (this, ipc, true, true); + CropWindow* cw = new CropWindow (this, true, true); cw->zoom11(); cw->setCropGUIListener (cropgl); cw->setPointerMotionListener (pmlistener); @@ -505,7 +525,7 @@ void ImageArea::cropWindowSelected (CropWindow* cw) void ImageArea::cropWindowClosed (CropWindow* cw) { - focusGrabber = NULL; + focusGrabber = nullptr; std::list::iterator i = std::find (cropWins.begin(), cropWins.end(), cw); if (i != cropWins.end()) { @@ -515,7 +535,7 @@ void ImageArea::cropWindowClosed (CropWindow* cw) if (!cropWins.empty()) { mainCropWindow->setObservedCropWin (cropWins.front()); } else { - mainCropWindow->setObservedCropWin (NULL); + mainCropWindow->setObservedCropWin (nullptr); } queue_draw (); @@ -690,6 +710,16 @@ ToolMode ImageArea::getToolMode () } } +bool ImageArea::showColorPickers () +{ + + if (listener && listener->getToolBar()) { + return listener->getToolBar()->showColorPickers (); + } else { + return false; + } +} + void ImageArea::setToolHand () { diff --git a/rtgui/imagearea.h b/rtgui/imagearea.h index bd2c19093..24a296913 100644 --- a/rtgui/imagearea.h +++ b/rtgui/imagearea.h @@ -33,7 +33,7 @@ #include "edit.h" class ImageAreaPanel; -class ImageArea : public Gtk::DrawingArea, public CropWindowListener, public EditDataProvider +class ImageArea : public Gtk::DrawingArea, public CropWindowListener, public EditDataProvider, public LockablePickerToolListener { friend class ZoomPanel; @@ -41,9 +41,8 @@ class ImageArea : public Gtk::DrawingArea, public CropWindowListener, public Edi protected: Glib::ustring infotext; - Glib::RefPtr ilayout; Glib::RefPtr deglayout; - Glib::RefPtr ipixbuf; + BackBuffer iBackBuffer; bool showClippedH, showClippedS; ImageAreaPanel* parent; @@ -70,10 +69,11 @@ public: PreviewModePanel* previewModePanel; ImageArea* iLinkedImageArea; // used to set a reference to the Before image area, which is set when before/after view is enabled - ImageArea (ImageAreaPanel* p); + explicit ImageArea (ImageAreaPanel* p); ~ImageArea (); - void setImProcCoordinator (rtengine::StagedImageProcessor* ipc_); + rtengine::StagedImageProcessor* getImProcCoordinator() const; + void setImProcCoordinator(rtengine::StagedImageProcessor* ipc_); void setPreviewModePanel(PreviewModePanel* previewModePanel_) { previewModePanel = previewModePanel_; @@ -122,6 +122,7 @@ public: void cropWindowSelected (CropWindow* cw); void cropWindowClosed (CropWindow* cw); ToolMode getToolMode (); + bool showColorPickers (); void setToolHand (); void straightenReady (double rotDeg); void spotWBSelected (int x, int y); @@ -143,6 +144,9 @@ public: void cropZoomChanged (CropWindow* cw); void initialImageArrived (CropWindow* cw) ; + // LockablePickerToolListener interface + void switchPickerVisibility (bool isVisible); + CropWindow* getMainCropWindow () { return mainCropWindow; diff --git a/rtgui/imageareapanel.cc b/rtgui/imageareapanel.cc index 9a351d66a..7bcb3d112 100644 --- a/rtgui/imageareapanel.cc +++ b/rtgui/imageareapanel.cc @@ -18,7 +18,7 @@ */ #include "imageareapanel.h" -ImageAreaPanel::ImageAreaPanel () : before(NULL), after(NULL) +ImageAreaPanel::ImageAreaPanel () : before(nullptr), after(nullptr) { set_border_width (2); diff --git a/rtgui/imageareatoollistener.h b/rtgui/imageareatoollistener.h index 3f1238810..b7d5cec94 100644 --- a/rtgui/imageareatoollistener.h +++ b/rtgui/imageareatoollistener.h @@ -27,21 +27,21 @@ class ImageAreaToolListener { public: - virtual void spotWBselected (int x, int y, Thumbnail* thm = NULL) {} + virtual ~ImageAreaToolListener() {} + virtual void spotWBselected (int x, int y, Thumbnail* thm = nullptr) {} virtual int getSpotWBRectSize () { return 8; } virtual void cropSelectionReady () {} - virtual void rotateSelectionReady (double rotate_deg, Thumbnail* thm = NULL) {} + virtual void rotateSelectionReady (double rotate_deg, Thumbnail* thm = nullptr) {} virtual ToolBar* getToolBar () { - return NULL; + return nullptr; } - virtual void removeWbTool() = 0; - virtual CropGUIListener* startCropEditing (Thumbnail* thm = NULL) + virtual CropGUIListener* startCropEditing (Thumbnail* thm = nullptr) { - return NULL; + return nullptr; } }; diff --git a/rtgui/impulsedenoise.h b/rtgui/impulsedenoise.h index 8052309c3..cd8de582b 100644 --- a/rtgui/impulsedenoise.h +++ b/rtgui/impulsedenoise.h @@ -34,9 +34,9 @@ public: ImpulseDenoise (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/indclippedpanel.cc b/rtgui/indclippedpanel.cc index e1f04b279..2a3330b5c 100644 --- a/rtgui/indclippedpanel.cc +++ b/rtgui/indclippedpanel.cc @@ -76,7 +76,7 @@ void IndicateClippedPanel::buttonToggled () // this will redraw the linked Before image area // which is set when before/after view is enabled - if (imageArea->iLinkedImageArea != NULL) { + if (imageArea->iLinkedImageArea != nullptr) { imageArea->iLinkedImageArea->queue_draw (); } } diff --git a/rtgui/indclippedpanel.h b/rtgui/indclippedpanel.h index 199a9f620..3a6bc5296 100644 --- a/rtgui/indclippedpanel.h +++ b/rtgui/indclippedpanel.h @@ -30,7 +30,7 @@ protected: ImageArea* imageArea; public: - IndicateClippedPanel (ImageArea* ia); + explicit IndicateClippedPanel (ImageArea* ia); void buttonToggled (); diff --git a/rtgui/inspector.cc b/rtgui/inspector.cc index 6c4891249..3909195b6 100644 --- a/rtgui/inspector.cc +++ b/rtgui/inspector.cc @@ -59,7 +59,7 @@ InspectorBuffer::~InspectorBuffer() { int InspectorBuffer::infoFromImage (const Glib::ustring& fname) { - rtengine::ImageMetaData* idata = rtengine::ImageMetaData::fromFile (fname, NULL); + rtengine::ImageMetaData* idata = rtengine::ImageMetaData::fromFile (fname, nullptr); if (!idata) { return 0; @@ -81,7 +81,7 @@ int InspectorBuffer::infoFromImage (const Glib::ustring& fname) return deg; } -Inspector::Inspector () : currImage(NULL), zoom(0.0), active(false) {} +Inspector::Inspector () : currImage(nullptr), zoom(0.0), active(false) {} Inspector::~Inspector() { @@ -207,7 +207,7 @@ void Inspector::switchImage (const Glib::ustring &fullPath) // deleting the last entries for (size_t i = images.size() - 1; i > size_t(options.maxInspectorBuffers - 1); --i) { delete images.at(i); - images.at(i) = NULL; + images.at(i) = nullptr; } // resizing down @@ -215,14 +215,14 @@ void Inspector::switchImage (const Glib::ustring &fullPath) } if (fullPath.empty()) { - currImage = NULL; + currImage = nullptr; queue_draw(); return; } else { bool found = false; for (size_t i = 0; i < images.size(); ++i) { - if (images.at(i) != NULL && images.at(i)->imgPath == fullPath) { + if (images.at(i) != nullptr && images.at(i)->imgPath == fullPath) { currImage = images.at(i); // rolling the list 1 step to the beginning @@ -251,7 +251,7 @@ void Inspector::switchImage (const Glib::ustring &fullPath) images.push_back(iBuffer); currImage = images.at(images.size() - 1); } else { - currImage = NULL; + currImage = nullptr; } } } @@ -260,14 +260,14 @@ void Inspector::switchImage (const Glib::ustring &fullPath) void Inspector::deleteBuffers () { for (size_t i = 0; i < images.size(); ++i) { - if (images.at(i) != NULL) { + if (images.at(i) != nullptr) { delete images.at(i); - images.at(i) = NULL; + images.at(i) = nullptr; } } images.resize(0); - currImage = NULL; + currImage = nullptr; } void Inspector::flushBuffers () diff --git a/rtgui/inspector.h b/rtgui/inspector.h index ce2da9aeb..4d275abd5 100644 --- a/rtgui/inspector.h +++ b/rtgui/inspector.h @@ -34,7 +34,7 @@ public: int currTransform; // coarse rotation from RT, not from shot orientation bool fromRaw; - InspectorBuffer(const Glib::ustring &imgagePath); + explicit InspectorBuffer(const Glib::ustring &imgagePath); //~InspectorBuffer(); }; diff --git a/rtgui/iptcpanel.h b/rtgui/iptcpanel.h index ce870d08d..7c26aa7ca 100644 --- a/rtgui/iptcpanel.h +++ b/rtgui/iptcpanel.h @@ -71,9 +71,9 @@ private: public: IPTCPanel (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setImageData (const rtengine::ImageMetaData* id); diff --git a/rtgui/labcurve.cc b/rtgui/labcurve.cc index 7e5bf7b53..a173b47ec 100644 --- a/rtgui/labcurve.cc +++ b/rtgui/labcurve.cc @@ -623,8 +623,8 @@ void LCurve::setBatchMode (bool batchMode) chromaticity->showEditedCB (); rstprotection->showEditedCB (); curveEditorG->setBatchMode (batchMode); - lcshape->setBottomBarColorProvider(NULL, -1); - lcshape->setLeftBarColorProvider(NULL, -1); + lcshape->setBottomBarColorProvider(nullptr, -1); + lcshape->setLeftBarColorProvider(nullptr, -1); } diff --git a/rtgui/labcurve.h b/rtgui/labcurve.h index 6caba6b8a..403b49f9e 100644 --- a/rtgui/labcurve.h +++ b/rtgui/labcurve.h @@ -64,9 +64,9 @@ public: LCurve (); ~LCurve (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void autoOpenCurve (); void setEditProvider (EditDataProvider *provider); diff --git a/rtgui/lensgeom.cc b/rtgui/lensgeom.cc index 07f86542c..423a7a3ec 100644 --- a/rtgui/lensgeom.cc +++ b/rtgui/lensgeom.cc @@ -23,7 +23,7 @@ using namespace rtengine; using namespace rtengine::procparams; -LensGeometry::LensGeometry () : FoldableToolPanel(this, "lensgeom", M("TP_LENSGEOM_LABEL")), rlistener(NULL) +LensGeometry::LensGeometry () : FoldableToolPanel(this, "lensgeom", M("TP_LENSGEOM_LABEL")), rlistener(nullptr) { fill = Gtk::manage (new Gtk::CheckButton (M("TP_LENSGEOM_FILL"))); diff --git a/rtgui/lensgeom.h b/rtgui/lensgeom.h index 51a6e108c..b963489e1 100644 --- a/rtgui/lensgeom.h +++ b/rtgui/lensgeom.h @@ -44,8 +44,8 @@ public: return packBox; } - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void fillPressed (); diff --git a/rtgui/lensprofile.h b/rtgui/lensprofile.h index cb3a5cc6c..9543721a0 100644 --- a/rtgui/lensprofile.h +++ b/rtgui/lensprofile.h @@ -45,8 +45,8 @@ public: LensProfilePanel (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setRawMeta (bool raw, const rtengine::ImageMetaData* pMeta); void onLCPFileChanged (); diff --git a/rtgui/lockablecolorpicker.cc b/rtgui/lockablecolorpicker.cc new file mode 100644 index 000000000..abfb94344 --- /dev/null +++ b/rtgui/lockablecolorpicker.cc @@ -0,0 +1,383 @@ +/* + * This file is part of RawTherapee. + * + * Copyright (c) 2004-2010 Gabor Horvath + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ + +#include "lockablecolorpicker.h" +#include "options.h" +#include "../rtengine/color.h" +#include "../rtengine/rt_math.h" +#include "imagearea.h" +#include "multilangmgr.h" +#include "navigator.h" + +extern Options options; + +LockableColorPicker::LockableColorPicker (CropWindow* cropWindow, Glib::ustring *oProfile, Glib::ustring *wProfile) +: cropWindow(cropWindow), displayedValues(ColorPickerType::RGB), position(0, 0), size(Size::S15), + outputProfile(oProfile), workingProfile(wProfile), validity(Validity::OUTSIDE), + r(0.f), g(0.f), b(0.f), rpreview(0.f), gpreview(0.f), bpreview(0.f), hue(0.f), sat(0.f), val(0.f), L(0.f), a(0.f), bb(0.f) +{} + +void LockableColorPicker::updateBackBuffer () +{ + int newW, newH; + + // -------------------- setting some key constants --------------------- + constexpr float circlePadding = 3.f; // keep this value odd + constexpr double opacity = 0.62; + // --------------------------------------------------------------------- + + if (validity == Validity::INSIDE) { + Gtk::DrawingArea *iArea = cropWindow->getImageArea(); + + Glib::RefPtr pangoContext = iArea->get_pango_context (); + Pango::FontDescription fontd(options.colorPickerFont); + fontd.set_weight(Pango::WEIGHT_NORMAL); + pangoContext->set_font_description (fontd); + + Glib::RefPtr layout[3][2]; + Glib::ustring s1, s2, s3; + PointerMotionListener* navigator = cropWindow->getPointerMotionListener (); + + switch (displayedValues) { + case ColorPickerType::RGB: + navigator->getRGBText ((int)(r*255.f), (int)(g*255.f), (int)(b*255.f), s1, s2, s3); + layout[0][0] = iArea->create_pango_layout(M("NAVIGATOR_R")); + layout[0][1] = iArea->create_pango_layout(s1); + layout[1][0] = iArea->create_pango_layout(M("NAVIGATOR_G")); + layout[1][1] = iArea->create_pango_layout(s2); + layout[2][0] = iArea->create_pango_layout(M("NAVIGATOR_B")); + layout[2][1] = iArea->create_pango_layout(s3); + break; + case ColorPickerType::HSV: + navigator->getHSVText (hue, sat, val, s1, s2, s3); + layout[0][0] = iArea->create_pango_layout(M("NAVIGATOR_H")); + layout[0][1] = iArea->create_pango_layout(s1); + layout[1][0] = iArea->create_pango_layout(M("NAVIGATOR_S")); + layout[1][1] = iArea->create_pango_layout(s2); + layout[2][0] = iArea->create_pango_layout(M("NAVIGATOR_V")); + layout[2][1] = iArea->create_pango_layout(s3); + break; + case ColorPickerType::LAB: + default: + navigator->getLABText (L, a, bb, s1, s2, s3); + layout[0][0] = iArea->create_pango_layout(M("NAVIGATOR_LAB_L")); + layout[0][1] = iArea->create_pango_layout(s1); + layout[1][0] = iArea->create_pango_layout(M("NAVIGATOR_LAB_A")); + layout[1][1] = iArea->create_pango_layout(s2); + layout[2][0] = iArea->create_pango_layout(M("NAVIGATOR_LAB_B")); + layout[2][1] = iArea->create_pango_layout(s3); + } + + int w00, w01, w10, w11, w20, w21, h00, h01, h10, h11, h20, h21; + layout[0][0]->get_pixel_size(w00, h00); + layout[1][0]->get_pixel_size(w10, h10); + layout[2][0]->get_pixel_size(w20, h20); + layout[0][1]->get_pixel_size(w01, h01); + layout[1][1]->get_pixel_size(w11, h11); + layout[2][1]->get_pixel_size(w21, h21); + int maxWCol0 = rtengine::max(w00, w10, w20); + int maxWCol1 = rtengine::max(w01, w11, w21); + int maxHRow0 = rtengine::max(h00, h01); + int maxHRow1 = rtengine::max(h10, h11); + int maxHRow2 = rtengine::max(h20, h21); + + // -------------------- setting some key constants --------------------- + constexpr int textPadding = 3; + const int textWidth = maxWCol0 + maxWCol1 + textPadding; + const int textHeight = maxHRow0 + maxHRow1 + maxHRow2 + 2*textPadding; + // --------------------------------------------------------------------- + + newW = rtengine::max((int)size + 2 * circlePadding, textWidth + 2 * textPadding); + newH = (int)size + 2 * circlePadding + textHeight + 2 * textPadding; + + setDrawRectangle(Cairo::FORMAT_ARGB32, 0, 0, newW, newH, true); + + Cairo::RefPtr bbcr = BackBuffer::getContext(); + + // cleaning the back buffer + bbcr->set_source_rgba (0., 0., 0., 0.); + bbcr->set_operator (Cairo::OPERATOR_CLEAR); + bbcr->paint (); + bbcr->set_operator (Cairo::OPERATOR_OVER); + + bbcr->set_antialias (Cairo::ANTIALIAS_SUBPIXEL); + bbcr->set_line_width (0.); + + float center = (float)size / 2.f + circlePadding; + + // black background of the whole color picker + bbcr->set_line_width (0.); + bbcr->set_source_rgba (0., 0., 0., opacity); + bbcr->arc_negative (center, center, center, 0., (double)M_PI); + bbcr->line_to (0, 2. * center + textHeight); + bbcr->arc_negative (2. * textPadding, 2. * center + textHeight, 2. * textPadding, (double)M_PI, (double)M_PI / 2.); + bbcr->line_to (textWidth, 2. * center + textHeight + 2. * textPadding); + bbcr->arc_negative (textWidth, 2. * center + textHeight, 2. * textPadding, (double)M_PI / 2., 0.); + bbcr->line_to (textWidth + 2. * textPadding, 2. * center + 2. * textPadding); + bbcr->arc_negative (textWidth, 2. * center + 2. * textPadding, 2. * textPadding, 0., (double)M_PI * 1.5); + bbcr->line_to (2. * center, 2. * center); + bbcr->close_path(); + bbcr->set_line_join (Cairo::LINE_JOIN_BEVEL); + bbcr->set_line_cap (Cairo::LINE_CAP_SQUARE); + bbcr->fill (); + + // light grey circle around the color mark + bbcr->arc (center, center, center - circlePadding / 2., 0., 2. * (double)M_PI); + bbcr->set_source_rgb (0.75, 0.75, 0.75); + bbcr->set_line_width (circlePadding - 2.); + bbcr->stroke (); + + // spot disc with picked color + bbcr->arc (center, center, center - circlePadding, 0., 2. * (double)M_PI); + bbcr->set_source_rgb (rpreview, gpreview, bpreview); // <- set the picker color here + bbcr->set_line_width (0.); + bbcr->fill(); + + // adding the font + bbcr->set_line_width (0.); + bbcr->set_line_join (Cairo::LINE_JOIN_ROUND); + bbcr->set_line_cap (Cairo::LINE_CAP_ROUND); + bbcr->set_source_rgb (1., 1., 1.); + double txtOffsetX = textPadding; + double txtOffsetY = (double)size + 2. * circlePadding + textPadding; + switch (iArea->get_direction()) { + case Gtk::TEXT_DIR_RTL: + bbcr->move_to (txtOffsetX , txtOffsetY); + layout[0][1]->add_to_cairo_context (bbcr); + bbcr->fill (); + bbcr->move_to (txtOffsetX + maxWCol1 + textPadding, txtOffsetY); + layout[0][0]->add_to_cairo_context (bbcr); + bbcr->fill (); + + bbcr->move_to (txtOffsetX , txtOffsetY + maxHRow0 + textPadding); + layout[1][1]->add_to_cairo_context (bbcr); + bbcr->fill (); + bbcr->move_to (txtOffsetX + maxWCol1 + textPadding, txtOffsetY + maxHRow0 + textPadding); + layout[1][0]->add_to_cairo_context (bbcr); + bbcr->fill (); + + bbcr->move_to (txtOffsetX , txtOffsetY + maxHRow0 + maxHRow1 + 2*textPadding); + layout[2][1]->add_to_cairo_context (bbcr); + bbcr->fill (); + bbcr->move_to (txtOffsetX + maxWCol1 + textPadding, txtOffsetY + maxHRow0 + maxHRow1 + 2*textPadding); + layout[2][0]->add_to_cairo_context (bbcr); + bbcr->fill (); + break; + default: + bbcr->move_to (txtOffsetX , txtOffsetY); + layout[0][0]->add_to_cairo_context (bbcr); + bbcr->fill (); + bbcr->move_to (txtOffsetX + maxWCol0 + textPadding, txtOffsetY); + layout[0][1]->add_to_cairo_context (bbcr); + bbcr->fill (); + + bbcr->move_to (txtOffsetX , txtOffsetY + maxHRow0 + textPadding); + layout[1][0]->add_to_cairo_context (bbcr); + bbcr->fill (); + bbcr->move_to (txtOffsetX + maxWCol0 + textPadding, txtOffsetY + maxHRow0 + textPadding); + layout[1][1]->add_to_cairo_context (bbcr); + bbcr->fill (); + + bbcr->move_to (txtOffsetX , txtOffsetY + maxHRow0 + maxHRow1 + 2*textPadding); + layout[2][0]->add_to_cairo_context (bbcr); + bbcr->fill (); + bbcr->move_to (txtOffsetX + maxWCol0 + textPadding, txtOffsetY + maxHRow0 + maxHRow1 + 2*textPadding); + layout[2][1]->add_to_cairo_context (bbcr); + bbcr->fill (); + } + + anchorOffset.set (center, center); + + setDirty (false); + } else if (validity == Validity::CROSSING) { + newH = newW = (int)size + 2 * circlePadding; + + setDrawRectangle(Cairo::FORMAT_ARGB32, 0, 0, newW, newH, true); + + Cairo::RefPtr bbcr = BackBuffer::getContext(); + + // cleaning the back buffer + bbcr->set_source_rgba (0., 0., 0., 0.); + bbcr->set_operator (Cairo::OPERATOR_CLEAR); + bbcr->paint (); + bbcr->set_operator (Cairo::OPERATOR_OVER); + + bbcr->set_antialias(Cairo::ANTIALIAS_SUBPIXEL); + + float center = (float)size / 2.f + circlePadding; + + // light grey circle around the color mark + bbcr->arc (center, center, center - circlePadding / 2., 0., 2. * (double)M_PI); + bbcr->set_source_rgba (0., 0., 0., opacity); + bbcr->set_line_width(circlePadding); + bbcr->stroke_preserve(); + bbcr->set_source_rgb (0.75, 0.75, 0.75); + bbcr->set_line_width (circlePadding - 2.); + bbcr->stroke (); + + anchorOffset.set (center, center); + + setDirty (false); + } + +} + +void LockableColorPicker::draw (Cairo::RefPtr &cr) +{ + if (validity == Validity::OUTSIDE) { + return; + } + + if (isDirty()) { + updateBackBuffer(); + } + int px, py; + cropWindow->imageCoordToScreen(position.x, position.y, px, py); + setDestPosition(px - anchorOffset.x, py - anchorOffset.y); + + copySurface(cr); +} + +void LockableColorPicker::setPosition (const rtengine::Coord &newPos) +{ + // we're not checking bounds here, this will be done at rendering time + position = newPos; +} + +void LockableColorPicker::setRGB (const float R, const float G, const float B, const float previewR, const float previewG, const float previewB) +{ + if (r==R && g==G && b==B) { + return; + } + + r = R; + g = G; + b = B; + + rpreview = previewR; + gpreview = previewG; + bpreview = previewB; + + rtengine::Color::rgb2hsv(r*65535.f, g*65535.f, b*65535.f, hue, sat, val); + rtengine::Color::rgb2lab (*outputProfile, *workingProfile, r * 65535.f, g * 65535.f, b * 65535.f, L, a, bb, options.rtSettings.HistogramWorking); // TODO: Really sure this function works? + + if (validity != Validity::OUTSIDE) { + setDirty(true); + } +} + +void LockableColorPicker::getImagePosition (rtengine::Coord &imgPos) +{ + imgPos = position; +} + +void LockableColorPicker::getScreenPosition (rtengine::Coord &screenPos) +{ + if (cropWindow) { + cropWindow->imageCoordToScreen(position.x, position.y, screenPos.x, screenPos.y); + } +} + +bool LockableColorPicker::isOver (int x, int y) +{ + if (!cropWindow) { + return false; + } + rtengine::Coord pickerScreenPos; + cropWindow->imageCoordToScreen(position.x, position.y, pickerScreenPos.x, pickerScreenPos.y); + + rtengine::Coord mousePos(x, y); + rtengine::Coord wh(getWidth(), getHeight()); + rtengine::Coord tl(pickerScreenPos - anchorOffset); + rtengine::Coord br(tl + wh); + return mousePos >= tl && mousePos <= br; +} + +void LockableColorPicker::setValidity (Validity validity) +{ + if (this->validity != validity) { + setDirty(true); + } + this->validity = validity; +} + +void LockableColorPicker::setSize (Size newSize) +{ + if (size != newSize) + { + size = newSize; + setDirty(true); + } +} + +LockableColorPicker::Size LockableColorPicker::getSize () +{ + return size; +} + +void LockableColorPicker::rollDisplayedValues () +{ + if (displayedValues < ColorPickerType::LAB) { + displayedValues = (ColorPickerType)(rtengine::toUnderlying(displayedValues) + 1); + } else { + displayedValues = ColorPickerType::RGB; + } + setDirty(true); + +} + +bool LockableColorPicker::incSize () +{ + if (size < Size::S30) { + size = (Size)(rtengine::toUnderlying(size) + 5); + setDirty(true); + return true; + } + return false; +} + +bool LockableColorPicker::decSize () +{ + if (size > Size::S5) { + size = (Size)(rtengine::toUnderlying(size) - 5); + setDirty(true); + return true; + } + return false; +} + +// return true if the picker has to be redrawn +bool LockableColorPicker::cycleRGB () +{ + if (displayedValues == ColorPickerType::RGB) { + setDirty (true); + return true; + } + return false; +} + +// return true if the picker has to be redrawn +bool LockableColorPicker::cycleHSV () +{ + if (displayedValues == ColorPickerType::HSV) { + setDirty (true); + return true; + } + return false; +} diff --git a/rtgui/lockablecolorpicker.h b/rtgui/lockablecolorpicker.h new file mode 100644 index 000000000..308f5d6d5 --- /dev/null +++ b/rtgui/lockablecolorpicker.h @@ -0,0 +1,97 @@ +/* + * This file is part of RawTherapee. + * + * Copyright (c) 2004-2010 Gabor Horvath + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ + +#ifndef __COLORPICKER__ +#define __COLORPICKER__ + + +#include "../rtengine/coord.h" +#include "guiutils.h" +#include "edit.h" + +class CropWindow; + +class LockablePickerToolListener { +public: + virtual ~LockablePickerToolListener () {} + + /// Callback on Color Picker's visibility switch + virtual void switchPickerVisibility (bool isVisible) {} +}; + +class LockableColorPicker : BackBuffer +{ +public: + enum class Size { + S5=5, + S10=10, + S15=15, + S20=20, + S25=25, + S30=30 + }; + enum class Validity { + INSIDE, + CROSSING, + OUTSIDE + }; +private: + enum class ColorPickerType { + RGB, + HSV, + LAB + }; + CropWindow* cropWindow; // the color picker is displayed in a single cropWindow, the one that the user has clicked in + ColorPickerType displayedValues; + rtengine::Coord position; // Coordinate in image space + rtengine::Coord anchorOffset; + Size size; + Glib::ustring *outputProfile; + Glib::ustring *workingProfile; + Validity validity; + float r, g, b; // red green blue in [0;1] range + float rpreview, gpreview, bpreview; + float hue, sat, val; // hue saturation value in [0;1] range + float L, a, bb; // L*a*b value in [0;1] range + + void updateBackBuffer (); + +public: + + LockableColorPicker (CropWindow* cropWindow, Glib::ustring *oProfile, Glib::ustring *wProfile); + + void draw (Cairo::RefPtr &cr); + + // Used to update the RGB color, the HSV values will be updated accordingly + void setPosition (const rtengine::Coord &newPos); + void setRGB (const float R, const float G, const float B, const float previewR, const float previewG, const float previewB); + void getImagePosition (rtengine::Coord &imgPos); + void getScreenPosition (rtengine::Coord &screenPos); + Size getSize (); + bool isOver (int x, int y); + void setValidity (Validity isValid); + void setSize (Size newSize); + void rollDisplayedValues (); + bool incSize (); + bool decSize (); + bool cycleRGB (); + bool cycleHSV (); +}; + +#endif diff --git a/rtgui/lwbutton.cc b/rtgui/lwbutton.cc index 52b7fd7e8..5a50c8307 100644 --- a/rtgui/lwbutton.cc +++ b/rtgui/lwbutton.cc @@ -20,7 +20,7 @@ #include "guiutils.h" LWButton::LWButton (Cairo::RefPtr i, int aCode, void* aData, Alignment ha, Alignment va, Glib::ustring tooltip) - : halign(ha), valign(va), icon(i), state(Normal), listener(NULL), actionCode(aCode), actionData(aData), toolTip(tooltip) + : xpos(0), ypos(0), halign(ha), valign(va), icon(i), bgr(0.0), bgg(0.0), bgb(0.0), fgr(0.0), fgg(0.0), fgb(0.0), state(Normal), listener(nullptr), actionCode(aCode), actionData(aData), toolTip(tooltip) { if (i) { diff --git a/rtgui/lwbuttonset.cc b/rtgui/lwbuttonset.cc index bfa4684af..c801cc33b 100644 --- a/rtgui/lwbuttonset.cc +++ b/rtgui/lwbuttonset.cc @@ -18,7 +18,7 @@ */ #include "lwbuttonset.h" -LWButtonSet::LWButtonSet () : aw(0), ah(0) +LWButtonSet::LWButtonSet () : aw(0), ah(0), ax(0), ay(0) { } diff --git a/rtgui/main.cc b/rtgui/main.cc index 114204858..a3b4a60f2 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -280,7 +280,7 @@ int main(int argc, char **argv) #endif if( !options.rtSettings.verbose ) { - TIFFSetWarningHandler(NULL); // avoid annoying message boxes + TIFFSetWarningHandler(nullptr); // avoid annoying message boxes } #ifndef WIN32 @@ -392,7 +392,7 @@ void deleteProcParams(std::vector &pparam int processLineParams( int argc, char **argv ) { - rtengine::procparams::PartialProfile *rawParams = NULL, *imgParams = NULL; + rtengine::procparams::PartialProfile *rawParams = nullptr, *imgParams = nullptr; std::vector inputFiles; Glib::ustring outputPath = ""; std::vector processingParams; @@ -723,8 +723,8 @@ int processLineParams( int argc, char **argv ) Glib::ustring inputFile = inputFiles[iFile]; std::cout << "Processing: " << inputFile << std::endl; - rtengine::InitialImage* ii = NULL; - rtengine::ProcessingJob* job = NULL; + rtengine::InitialImage* ii = nullptr; + rtengine::ProcessingJob* job = nullptr; int errorCode; bool isRaw = false; @@ -766,7 +766,7 @@ int processLineParams( int argc, char **argv ) isRaw = false; } - ii = rtengine::InitialImage::load ( inputFile, isRaw, &errorCode, NULL ); + ii = rtengine::InitialImage::load ( inputFile, isRaw, &errorCode, nullptr ); if (!ii) { errors++; @@ -827,7 +827,7 @@ int processLineParams( int argc, char **argv ) } // Process image - rtengine::IImage16* resultImage = rtengine::processImage (job, errorCode, NULL, options.tunnelMetaData); + rtengine::IImage16* resultImage = rtengine::processImage (job, errorCode, nullptr, options.tunnelMetaData); if( !resultImage ) { errors++; diff --git a/rtgui/mycurve.cc b/rtgui/mycurve.cc index 626eef4f1..255818e7c 100644 --- a/rtgui/mycurve.cc +++ b/rtgui/mycurve.cc @@ -21,7 +21,7 @@ #include #include -MyCurve::MyCurve () : pipetteR(-1.f), pipetteG(-1.f), pipetteB(-1.f), pipetteVal(-1.f), listener(NULL), cursor_type( CSArrow) +MyCurve::MyCurve () : pipetteR(-1.f), pipetteG(-1.f), pipetteB(-1.f), pipetteVal(-1.f), listener(nullptr), cursor_type( CSArrow) { graphX = get_allocation().get_width() - RADIUS * 2; @@ -30,9 +30,9 @@ MyCurve::MyCurve () : pipetteR(-1.f), pipetteG(-1.f), pipetteB(-1.f), pipetteVal prevGraphH = graphH; buttonPressed = false; snapTo = ST_None; - leftBar = NULL; - bottomBar = NULL; - colorProvider = NULL; + leftBar = nullptr; + bottomBar = nullptr; + colorProvider = nullptr; sized = RS_Pending; snapToElmt = -100; curveIsDirty = true; @@ -152,11 +152,11 @@ void MyCurve::on_style_changed (const Glib::RefPtr& style) void MyCurve::refresh() { - if (leftBar != NULL) { + if (leftBar != nullptr) { leftBar->setDirty(true); } - if (bottomBar != NULL) { + if (bottomBar != nullptr) { bottomBar->setDirty(true); } diff --git a/rtgui/mydiagonalcurve.cc b/rtgui/mydiagonalcurve.cc index fd57633fb..969b197a2 100644 --- a/rtgui/mydiagonalcurve.cc +++ b/rtgui/mydiagonalcurve.cc @@ -165,11 +165,11 @@ void MyDiagonalCurve::get_LUT (LUTf &lut) // calculate remaining points std::vector curveDescr = getPoints (); rtengine::DiagonalCurve rtcurve(curveDescr, lut.getUpperBound() * 1.2); - double t; + double maxVal = double(lut.getUpperBound()); for (int i = 0; i < size; i++) { - t = double(i) / maxVal; + double t = double(i) / maxVal; lut[i] = rtcurve.getVal (t); } @@ -1167,7 +1167,6 @@ void MyDiagonalCurve::pipetteButton1Released(EditDataProvider *provider) snapToElmt = -100; if (curve.type != DCT_Parametric) { - std::vector::iterator itx, ity; buttonPressed = false; /* get the pointer position */ getCursorPosition(Gdk::EventType(Gdk::BUTTON_RELEASE), false, graphY, 0, Gdk::ModifierType(0)); diff --git a/rtgui/myflatcurve.cc b/rtgui/myflatcurve.cc index 4127d1ae8..4ccc8b5bb 100644 --- a/rtgui/myflatcurve.cc +++ b/rtgui/myflatcurve.cc @@ -86,11 +86,10 @@ void MyFlatCurve::get_LUT (LUTf &lut) std::vector curveDescr = getPoints (); rtengine::FlatCurve rtcurve(curveDescr, periodic, lut.getUpperBound() * 1.2 > 5000 ? 5000 : lut.getUpperBound() * 1.2); - double t; double maxVal = double(lut.getUpperBound()); for (int i = 0; i < size; i++) { - t = double(i) / maxVal; + double t = double(i) / maxVal; lut[i] = rtcurve.getVal (t); } @@ -815,13 +814,13 @@ bool MyFlatCurve::handleEvents (GdkEvent* event) case Gdk::BUTTON_RELEASE: if (edited_point == -1) { //curve.type!=FCT_Parametric) { if (buttonPressed && event->button.button == 1) { - int src, dst; buttonPressed = false; remove_modal_grab (); // Removing any deleted point if we were previously modifying the point position if (editedHandle & (FCT_EditedHandle_CPoint | FCT_EditedHandle_CPointX | FCT_EditedHandle_CPointY)) { /* delete inactive points: */ + int src, dst; itx = curve.x.begin(); ity = curve.y.begin(); itlt = curve.leftTangent.begin(); diff --git a/rtgui/navigator.cc b/rtgui/navigator.cc index 049b4ec7e..2c724ee4c 100644 --- a/rtgui/navigator.cc +++ b/rtgui/navigator.cc @@ -215,6 +215,55 @@ void Navigator::setInvalid (int fullWidth, int fullHeight) LAB_L->set_text (M("NAVIGATOR_NA")); } +void Navigator::getRGBText (int r, int g, int b, Glib::ustring &sR, Glib::ustring &sG, Glib::ustring &sB) +{ + switch (currentRGBUnit) { + case (Options::NavigatorUnit::R0_1): + sR = Glib::ustring::format(std::fixed, std::setprecision(4), r / 255.f); + sG = Glib::ustring::format(std::fixed, std::setprecision(4), g / 255.f); + sB = Glib::ustring::format(std::fixed, std::setprecision(4), b / 255.f); + break; + case (Options::NavigatorUnit::R0_255): + sR = Glib::ustring::format(std::fixed, std::setprecision(0), r); + sG = Glib::ustring::format(std::fixed, std::setprecision(0), g); + sB = Glib::ustring::format(std::fixed, std::setprecision(0), b); + break; + case (Options::NavigatorUnit::PERCENT): + default: + sR = Glib::ustring::format(std::fixed, std::setprecision(1), r * 100.f / 255.f) + Glib::ustring("%"); + sG = Glib::ustring::format(std::fixed, std::setprecision(1), g * 100.f / 255.f) + Glib::ustring("%"); + sB = Glib::ustring::format(std::fixed, std::setprecision(1), b * 100.f / 255.f) + Glib::ustring("%"); + } +} + +void Navigator::getHSVText (float h, float s, float v, Glib::ustring &sH, Glib::ustring &sS, Glib::ustring &sV) +{ + switch (currentHSVUnit) { + case (Options::NavigatorUnit::R0_1): + sH = Glib::ustring::format(std::fixed, std::setprecision(4), h); + sS = Glib::ustring::format(std::fixed, std::setprecision(4), s); + sV = Glib::ustring::format(std::fixed, std::setprecision(4), v); + break; + case (Options::NavigatorUnit::R0_255): + sH = Glib::ustring::format(std::fixed, std::setprecision(0), h * 255); + sS = Glib::ustring::format(std::fixed, std::setprecision(0), s * 255); + sV = Glib::ustring::format(std::fixed, std::setprecision(0), v * 255); + break; + case (Options::NavigatorUnit::PERCENT): + default: + sH = Glib::ustring::format(std::fixed, std::setprecision(1), h * 360.f) + Glib::ustring("\xc2\xb0"); + sS = Glib::ustring::format(std::fixed, std::setprecision(1), s * 100.f) + Glib::ustring("%"); + sV = Glib::ustring::format(std::fixed, std::setprecision(1), v * 100.f) + Glib::ustring("%"); + } +} + +void Navigator::getLABText (float l, float a, float b, Glib::ustring &sL, Glib::ustring &sA, Glib::ustring &sB) +{ + sL = Glib::ustring::format(std::fixed, std::setprecision(1), l); + sA = Glib::ustring::format(std::fixed, std::setprecision(1), a); + sB = Glib::ustring::format(std::fixed, std::setprecision(1), b); +} + // if !validPos then x/y contain the full image size void Navigator::pointerMoved (bool validPos, Glib::ustring profile, Glib::ustring profileW, int x, int y, int r, int g, int b) { @@ -222,54 +271,28 @@ void Navigator::pointerMoved (bool validPos, Glib::ustring profile, Glib::ustrin if (!validPos) { setInvalid (x, y); } else { + Glib::ustring s1, s2, s3; + float h, s, v; + float LAB_a, LAB_b, LAB_l; + position->set_text (Glib::ustring::compose ("x: %1, y: %2", x, y)); - switch (currentRGBUnit) { - case (Options::NavigatorUnit::R0_1): - R->set_text (Glib::ustring::format(std::fixed, std::setprecision(4), r / 255.f)); - G->set_text (Glib::ustring::format(std::fixed, std::setprecision(4), g / 255.f)); - B->set_text (Glib::ustring::format(std::fixed, std::setprecision(4), b / 255.f)); - break; - case (Options::NavigatorUnit::R0_255): - R->set_text (Glib::ustring::format(std::fixed, std::setprecision(0), r)); - G->set_text (Glib::ustring::format(std::fixed, std::setprecision(0), g)); - B->set_text (Glib::ustring::format(std::fixed, std::setprecision(0), b)); - break; - case (Options::NavigatorUnit::PERCENT): - default: - R->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), r * 100.f / 255.f) + Glib::ustring("%")); - G->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), g * 100.f / 255.f) + Glib::ustring("%")); - B->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), b * 100.f / 255.f) + Glib::ustring("%")); - break; - } + getRGBText (r, g, b, s1, s2, s3); + R->set_text (s1); + G->set_text (s2); + B->set_text (s3); - float h, s, v; Color::rgb2hsv (r * 0xffff / 0xff, g * 0xffff / 0xff, b * 0xffff / 0xff, h, s, v); - switch (currentHSVUnit) { - case (Options::NavigatorUnit::R0_1): - H->set_text (Glib::ustring::format(std::fixed, std::setprecision(4), h)); - S->set_text (Glib::ustring::format(std::fixed, std::setprecision(4), s)); - V->set_text (Glib::ustring::format(std::fixed, std::setprecision(4), v)); - break; - case (Options::NavigatorUnit::R0_255): - H->set_text (Glib::ustring::format(std::fixed, std::setprecision(0), h * 255)); - S->set_text (Glib::ustring::format(std::fixed, std::setprecision(0), s * 255)); - V->set_text (Glib::ustring::format(std::fixed, std::setprecision(0), v * 255)); - break; - case (Options::NavigatorUnit::PERCENT): - default: - H->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), h * 360.f) + Glib::ustring("\xc2\xb0")); - S->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), s * 100.f) + Glib::ustring("%")); - V->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), v * 100.f) + Glib::ustring("%")); - break; - } + getHSVText (h, s, v, s1, s2, s3); + H->set_text (s1); + S->set_text (s2); + V->set_text (s3); - float LAB_a, LAB_b, LAB_l; - //rgb2lab (r, g, b, LAB_l, LAB_a, LAB_b); - rgb2lab (profile, profileW, r, g, b, LAB_l, LAB_a, LAB_b); // TODO: Really sure this function works? - LAB_A->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), LAB_a)); - LAB_B->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), LAB_b)); - LAB_L->set_text (Glib::ustring::format(std::fixed, std::setprecision(1), LAB_l)); + Color::rgb2lab (profile, profileW, r * 0xffff / 0xff, g * 0xffff / 0xff, b * 0xffff / 0xff, LAB_l, LAB_a, LAB_b, options.rtSettings.HistogramWorking); // TODO: Really sure this function works? + getLABText (LAB_l, LAB_a, LAB_b, s1, s2, s3); + LAB_L->set_text (s1); + LAB_A->set_text (s2); + LAB_B->set_text (s3); } } @@ -299,6 +322,7 @@ void Navigator::cycleUnitsRGB (GdkEventButton *event) { B->set_text ("[%]"); break; } + sig_cycle_rgb.emit(); } void Navigator::cycleUnitsHSV (GdkEventButton *event) { @@ -327,151 +351,5 @@ void Navigator::cycleUnitsHSV (GdkEventButton *event) { V->set_text ("[%]"); break; } -} - -void Navigator::rgb2lab (Glib::ustring profile, Glib::ustring profileW, int r, int g, int b, float &LAB_l, float &LAB_a, float &LAB_b) -{ - double xyz_rgb[3][3]; - const double ep = 216.0 / 24389.0; - const double ka = 24389.0 / 27.0; - - double var_R = r / 255.0; - double var_G = g / 255.0; - double var_B = b / 255.0; - - Glib::ustring profileCalc; - profileCalc = "sRGB"; //default - - if(options.rtSettings.HistogramWorking) { - profileCalc = profileW; //display working - } - - else {// if you want display = output space - if (profile == "RT_sRGB" || profile == "RT_sRGB_gBT709" || profile == "RT_sRGB_g10") { - profileCalc = "sRGB"; - } - - if (profile == "ProPhoto" || profile == "RT_Large_gBT709" || profile == "RT_Large_g10" || profile == "RT_Large_gsRGB") { - profileCalc = "ProPhoto"; - } - - if (profile == "AdobeRGB1998" || profile == "RT_Medium_gsRGB") { - profileCalc = "Adobe RGB"; - } - - if (profile == "WideGamutRGB") { - profileCalc = "WideGamut"; - } - } - - if(options.rtSettings.HistogramWorking) {//display working - if (profileW == "sRGB") { //apply sRGB inverse gamma - - if ( var_R > 0.04045 ) { - var_R = pow ( ( ( var_R + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); - } else { - var_R = var_R / 12.92; - } - - if ( var_G > 0.04045 ) { - var_G = pow ( ( ( var_G + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); - } else { - var_G = var_G / 12.92; - } - - if ( var_B > 0.04045 ) { - var_B = pow ( ( ( var_B + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); - } else { - var_B = var_B / 12.92; - } - } else if (profileW == "ProPhoto") { // apply inverse gamma 1.8 - var_R = pow ( var_R, 1.8); - var_G = pow ( var_G, 1.8); - var_B = pow ( var_B, 1.8); - } else { // apply inverse gamma 2.2 - var_R = pow ( var_R, 2.2); - var_G = pow ( var_G, 2.2); - var_B = pow ( var_B, 2.2); - } - } else { //display outout profile - - if (profile == "RT_sRGB" || profile == "RT_Large_gsRGB" || profile == "RT_Medium_gsRGB") { //apply sRGB inverse gamma - if ( var_R > 0.04045 ) { - var_R = pow ( ( ( var_R + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); - } else { - var_R = var_R / 12.92; - } - - if ( var_G > 0.04045 ) { - var_G = pow ( ( ( var_G + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); - } else { - var_G = var_G / 12.92; - } - - if ( var_B > 0.04045 ) { - var_B = pow ( ( ( var_B + 0.055 ) / 1.055 ), rtengine::Color::sRGBGammaCurve); - } else { - var_B = var_B / 12.92; - } - } - - else if (profile == "RT_sRGB_gBT709" || profile == "RT_Large_gBT709") { // - if ( var_R > 0.0795 ) { - var_R = pow ( ( ( var_R + 0.0954 ) / 1.0954 ), 2.2); - } else { - var_R = var_R / 4.5; - } - - if ( var_G > 0.0795 ) { - var_G = pow ( ( ( var_G + 0.0954 ) / 1.0954 ), 2.2); - } else { - var_G = var_G / 4.5; - } - - if ( var_B > 0.0795 ) { - var_B = pow ( ( ( var_B + 0.0954 ) / 1.0954 ), 2.2); - } else { - var_B = var_B / 4.5; - } - - } else if (profile == "ProPhoto") { // apply inverse gamma 1.8 - - var_R = pow ( var_R, 1.8); - var_G = pow ( var_G, 1.8); - var_B = pow ( var_B, 1.8); - } else if (profile == "RT_sRGB_g10" || profile == "RT_Large_g10") { // apply inverse gamma 1.8 - - var_R = pow ( var_R, 1.); - var_G = pow ( var_G, 1.); - var_B = pow ( var_B, 1.); - } - - else {// apply inverse gamma 2.2 - var_R = pow ( var_R, 2.2); - var_G = pow ( var_G, 2.2); - var_B = pow ( var_B, 2.2); - } - } - - // TMatrix wprof = rtengine::ICCStore::getInstance()->workingSpaceMatrix (profileW); - - TMatrix wprof = rtengine::ICCStore::getInstance()->workingSpaceMatrix (profileCalc); - - for (int m = 0; m < 3; m++) - for (int n = 0; n < 3; n++) { - xyz_rgb[m][n] = wprof[m][n]; - } - - double varxx, varyy, varzz; - double var_X = ( xyz_rgb[0][0] * var_R + xyz_rgb[0][1] * var_G + xyz_rgb[0][2] * var_B ) / Color::D50x; - double var_Y = ( xyz_rgb[1][0] * var_R + xyz_rgb[1][1] * var_G + xyz_rgb[1][2] * var_B ) ; - double var_Z = ( xyz_rgb[2][0] * var_R + xyz_rgb[2][1] * var_G + xyz_rgb[2][2] * var_B ) / Color::D50z; - - varxx = var_X > ep ? cbrt(var_X) : ( ka * var_X + 16.0) / 116.0 ; - varyy = var_Y > ep ? cbrt(var_Y) : ( ka * var_Y + 16.0) / 116.0 ; - varzz = var_Z > ep ? cbrt(var_Z) : ( ka * var_Z + 16.0) / 116.0 ; - LAB_l = ( 116 * varyy ) - 16; - LAB_a = 500 * ( varxx - varyy ); - LAB_b = 200 * ( varyy - varzz ); - + sig_cycle_hsv.emit(); } diff --git a/rtgui/navigator.h b/rtgui/navigator.h index e0b79d8dd..647df7a34 100644 --- a/rtgui/navigator.h +++ b/rtgui/navigator.h @@ -46,8 +46,6 @@ protected: Gtk::Label *lH, *lS, *lV; Gtk::Label *lLAB_A, *lLAB_B, *lLAB_L; - void rgb2lab (Glib::ustring profile, Glib::ustring profileW, int r, int g, int b, float &LAB_l, float &LAB_a, float &LAB_b); - void setInvalid (int fullWidth = -1, int fullHeight = -1); public: @@ -59,6 +57,10 @@ public: // void pointerMoved (bool validPos, int x, int y, int r, int g, int b); void pointerMoved (bool validPos, Glib::ustring profile, Glib::ustring profileW, int x, int y, int r, int g, int b); + void getRGBText (int r, int g, int b, Glib::ustring &sR, Glib::ustring &sG, Glib::ustring &sB); + void getHSVText (float h, float s, float v, Glib::ustring &sH, Glib::ustring &sS, Glib::ustring &sV); + void getLABText (float l, float a, float b, Glib::ustring &sL, Glib::ustring &sA, Glib::ustring &sB); + }; #endif diff --git a/rtgui/options.cc b/rtgui/options.cc index d6a327dc8..1c29387ac 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -74,11 +74,7 @@ inline bool Options::checkProfilePath(Glib::ustring &path) p = getGlobalProfilePath(); - if (!p.empty() && Glib::file_test (path + paramFileExtension, Glib::FILE_TEST_EXISTS)) { - return true; - } else { - return false; - } + return !p.empty() && Glib::file_test (path + paramFileExtension, Glib::FILE_TEST_EXISTS); } bool Options::checkDirPath(Glib::ustring &path, Glib::ustring errString) @@ -292,6 +288,7 @@ void Options::setDefaults () { font = "sans, 8"; + colorPickerFont = "sans, 8"; windowWidth = 1200; windowHeight = 680; windowX = 0; @@ -359,10 +356,10 @@ void Options::setDefaults () profilePath = "profiles"; loadSaveProfilePath = ""; // will be corrected in load as otherwise construction fails version = "0.0.0.0"; // temporary value; will be correctly set in RTWindow::on_realize - thumbSize = 240; - thumbSizeTab = 180; + thumbSize = 160; + thumbSizeTab = 160; thumbSizeQueue = 160; - sameThumbSize = true; // preferring speed of switch between file browser and single editor tab + sameThumbSize = false; // preferring speed of switch between file browser and single editor tab showHistory = true; showFilePanelState = 0; // Not used anymore ; was the thumb strip state showInfo = true; @@ -393,8 +390,8 @@ void Options::setDefaults () gimpDir = ""; psDir = ""; customEditorProg = ""; + CPBKeys = CPBKT_TID; editorToSendTo = 1; - liveThumbnails = true; favoriteDirs.clear(); tpOpen.clear (); //crvOpen.clear (); @@ -471,6 +468,7 @@ void Options::setDefaults () fastexport_icm_working = "ProPhoto"; fastexport_icm_output = "RT_sRGB"; fastexport_icm_outputIntent = rtengine::RI_RELATIVE; + fastexport_icm_outputBPC = true; fastexport_icm_gamma = "default"; fastexport_resize_enabled = true; fastexport_resize_scale = 1; @@ -636,6 +634,7 @@ void Options::setDefaults () rtSettings.monitorProfile = Glib::ustring(); rtSettings.monitorIntent = rtengine::RI_RELATIVE; + rtSettings.monitorBPC = true; rtSettings.autoMonitorProfile = false; rtSettings.adobe = "RT_Medium_gsRGB"; // put the name of yours profiles (here windows) rtSettings.prophoto = "RT_Large_gBT709"; // these names appear in the menu "output profile" @@ -1090,10 +1089,6 @@ int Options::readFromFile (Glib::ustring fname) thumbInterp = keyFile.get_integer ("File Browser", "ThumbnailInterpolation"); } - if (keyFile.has_key ("File Browser", "LiveThumbnails")) { - liveThumbnails = keyFile.get_boolean ("File Browser", "LiveThumbnails"); - } - if (keyFile.has_key ("File Browser", "FavoriteDirs")) { favoriteDirs = keyFile.get_string_list ("File Browser", "FavoriteDirs"); } @@ -1246,6 +1241,10 @@ int Options::readFromFile (Glib::ustring fname) font = keyFile.get_string ("GUI", "Font"); } + if (keyFile.has_key ("GUI", "ColorPickerFont")) { + colorPickerFont = keyFile.get_string ("GUI", "ColorPickerFont"); + } + if (keyFile.has_key ("GUI", "WindowWidth")) { windowWidth = keyFile.get_integer ("GUI", "WindowWidth"); } @@ -1471,6 +1470,10 @@ int Options::readFromFile (Glib::ustring fname) rtSettings.monitorIntent = static_cast(keyFile.get_integer("Color Management", "Intent")); } + if (keyFile.has_key ("Color Management", "MonitorBPC")) { + rtSettings.monitorBPC = keyFile.get_boolean("Color Management", "MonitorBPC"); + } + if (keyFile.has_key ("Color Management", "CRI")) { rtSettings.CRI_color = keyFile.get_integer("Color Management", "CRI"); } @@ -1727,6 +1730,10 @@ int Options::readFromFile (Glib::ustring fname) fastexport_icm_outputIntent = static_cast(keyFile.get_integer ("Fast Export", "fastexport_icm_output_intent" )); } + if (keyFile.has_key ("Fast Export", "fastexport_icm_output_bpc" )) { + fastexport_icm_outputBPC = keyFile.get_boolean ("Fast Export", "fastexport_icm_output_bpc" ); + } + if (keyFile.has_key ("Fast Export", "fastexport_icm_gamma" )) { fastexport_icm_gamma = keyFile.get_string ("Fast Export", "fastexport_icm_gamma" ); } @@ -1786,13 +1793,9 @@ int Options::readFromFile (Glib::ustring fname) } } catch (Glib::Error &err) { - if (options.rtSettings.verbose) { - printf("Options::readFromFile / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); - } + printf("Options::readFromFile / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); } catch (...) { - if (options.rtSettings.verbose) { - printf("Options::readFromFile / Unknown exception while trying to load \"%s\"!\n", fname.c_str()); - } + printf("Options::readFromFile / Unknown exception while trying to load \"%s\"!\n", fname.c_str()); } return 1; @@ -1883,7 +1886,6 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_integer_list ("File Browser", "ParseExtensionsEnabled", pextena); keyFile.set_integer ("File Browser", "ThumbnailArrangement", fbArrangement); keyFile.set_integer ("File Browser", "ThumbnailInterpolation", thumbInterp); - keyFile.set_boolean ("File Browser", "LiveThumbnails", liveThumbnails); Glib::ArrayHandle pfav = favoriteDirs; keyFile.set_string_list ("File Browser", "FavoriteDirs", pfav); Glib::ArrayHandle pren = renameTemplates; @@ -1973,6 +1975,7 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_integer ("Profiles", "CustomProfileBuilderKeys", CPBKeys); keyFile.set_string ("GUI", "Font", font); + keyFile.set_string ("GUI", "ColorPickerFont", colorPickerFont); keyFile.set_integer ("GUI", "WindowWidth", windowWidth); keyFile.set_integer ("GUI", "WindowHeight", windowHeight); keyFile.set_integer ("GUI", "WindowX", windowX); @@ -2034,6 +2037,7 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_boolean ("Color Management", "Autocielab", rtSettings.autocielab); keyFile.set_boolean ("Color Management", "RGBcurvesLumamode_Gamut", rtSettings.rgbcurveslumamode_gamut); keyFile.set_integer ("Color Management", "Intent", rtSettings.monitorIntent); + keyFile.set_boolean ("Color Management", "MonitorBPC", rtSettings.monitorBPC); keyFile.set_integer ("Color Management", "view", rtSettings.viewingdevice); keyFile.set_integer ("Color Management", "grey", rtSettings.viewingdevicegrey); keyFile.set_integer ("Color Management", "greySc", rtSettings.viewinggreySc); @@ -2102,6 +2106,7 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_string ("Fast Export", "fastexport_icm_working" , fastexport_icm_working ); keyFile.set_string ("Fast Export", "fastexport_icm_output" , fastexport_icm_output ); keyFile.set_integer ("Fast Export", "fastexport_icm_output_intent" , fastexport_icm_outputIntent ); + keyFile.set_boolean ("Fast Export", "fastexport_icm_output_bpc" , fastexport_icm_outputBPC ); keyFile.set_string ("Fast Export", "fastexport_icm_gamma" , fastexport_icm_gamma ); keyFile.set_boolean ("Fast Export", "fastexport_resize_enabled" , fastexport_resize_enabled ); keyFile.set_double ("Fast Export", "fastexport_resize_scale" , fastexport_resize_scale ); @@ -2136,7 +2141,7 @@ int Options::saveToFile (Glib::ustring fname) FILE *f = g_fopen (fname.c_str (), "wt"); - if (f == NULL) { + if (f == nullptr) { if (options.rtSettings.verbose) { printf("Options::saveToFile / Error: unable to open file \"%s\" with write access!\n", fname.c_str()); } @@ -2159,7 +2164,7 @@ bool Options::load () path = g_getenv("RT_SETTINGS"); - if (path != NULL) { + if (path != nullptr) { rtdir = Glib::ustring(path); if (!Glib::path_is_absolute(rtdir)) { @@ -2168,9 +2173,9 @@ bool Options::load () } else { #ifdef WIN32 WCHAR pathW[MAX_PATH] = {0}; - char pathA[MAX_PATH]; if (SHGetSpecialFolderPathW(NULL, pathW, CSIDL_LOCAL_APPDATA, false)) { + char pathA[MAX_PATH]; WideCharToMultiByte(CP_UTF8, 0, pathW, -1, pathA, MAX_PATH, 0, 0); rtdir = Glib::build_filename(Glib::ustring(pathA), Glib::ustring(CACHEFOLDERNAME)); } @@ -2193,7 +2198,7 @@ bool Options::load () // Modify the path of the cache folder to the one provided in RT_CACHE environment variable path = g_getenv("RT_CACHE"); - if (path != NULL) { + if (path != nullptr) { cacheBaseDir = Glib::ustring(path); if (!Glib::path_is_absolute(cacheBaseDir)) { @@ -2318,7 +2323,7 @@ bool Options::load () void Options::save () { - if (options.multiUser == false) { + if (!options.multiUser) { options.saveToFile (Glib::build_filename(argv0, "options")); } else { options.saveToFile (Glib::build_filename(rtdir, "options")); diff --git a/rtgui/options.h b/rtgui/options.h index c25708674..ab0726798 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -120,6 +120,7 @@ public: bool editorFilmStripOpened; int historyPanelWidth; Glib::ustring font; + Glib::ustring colorPickerFont; int windowWidth; int windowHeight; int windowX; @@ -179,9 +180,7 @@ public: int editorToSendTo; int maxThumbnailHeight; std::size_t maxCacheEntries; - ThFileType thumbnailFormat; int thumbInterp; // 0: nearest, 1: bilinear - bool liveThumbnails; std::vector parseExtensions; // List containing all extensions type std::vector parseExtensionsEnabled; // List of bool to retain extension or not std::vector parsedExtensions; // List containing all retained extensions (lowercase) @@ -202,7 +201,6 @@ public: bool showFileNames; bool filmStripShowFileNames; bool tabbedUI; - int previewSizeTab, previewSizeBrowser; bool rememberZoomAndPan; int multiDisplayMode; // 0=none, 1=Edit panels on other display std::vector cutOverlayBrush; // Red;Green;Blue;Alpha , all ranging 0..1 @@ -218,7 +216,6 @@ public: //int histogramWorking; // 0=disabled, 1=left pane, 2=right pane bool histogramBar; bool histogramFullMode; - bool showProfileSelector; bool FileBrowserToolbarSingleRow; bool hideTPVScrollbar; bool UseIconNoText; @@ -269,6 +266,7 @@ public: Glib::ustring fastexport_icm_working; Glib::ustring fastexport_icm_output; rtengine::RenderingIntent fastexport_icm_outputIntent; + bool fastexport_icm_outputBPC; Glib::ustring fastexport_icm_gamma; bool fastexport_resize_enabled; double fastexport_resize_scale; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index a84251607..d5122444f 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -357,8 +357,9 @@ void ParamsEdited::set (bool v) icm.working = v; icm.output = v; icm.outputIntent = v; + icm.outputBPC = v; icm.gamma = v; - icm.freegamma = v; + icm.freegamma = v; icm.gampos = v; icm.slpos = v; raw.bayersensor.method = v; @@ -853,6 +854,7 @@ void ParamsEdited::initFrom (const std::vector icm.working = icm.working && p.icm.working == other.icm.working; icm.output = icm.output && p.icm.output == other.icm.output; icm.outputIntent = icm.outputIntent && p.icm.outputIntent == other.icm.outputIntent; + icm.outputBPC = icm.outputBPC && p.icm.outputBPC == other.icm.outputBPC ; icm.gamma = icm.gamma && p.icm.gamma == other.icm.gamma; icm.freegamma = icm.freegamma && p.icm.freegamma == other.icm.freegamma; icm.gampos = icm.gampos && p.icm.gampos == other.icm.gampos; @@ -2224,8 +2226,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.icm.outputIntent = mods.icm.outputIntent; } - //if (icm.gampos) toEdit.icm.gampos = mods.icm.gampos; - //if (icm.slpos) toEdit.icm.slpos = mods.icm.slpos; + if (icm.outputBPC) { + toEdit.icm.outputBPC = mods.icm.outputBPC; + } + if (icm.gampos) { toEdit.icm.gampos = dontforceSet && options.baBehav[ADDSET_FREE_OUPUT_GAMMA] ? toEdit.icm.gampos + mods.icm.gampos : mods.icm.gampos; } diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 94b69389c..60fabc5ce 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -551,6 +551,7 @@ public: bool working; bool output; bool outputIntent; + bool outputBPC; bool gamma; bool gampos; bool slpos; @@ -791,7 +792,7 @@ public: bool exif; bool iptc; - ParamsEdited (bool value = false); + explicit ParamsEdited (bool value = false); void set (bool v); void initFrom (const std::vector& src); diff --git a/rtgui/partialpastedlg.cc b/rtgui/partialpastedlg.cc index d017b5409..78631b725 100644 --- a/rtgui/partialpastedlg.cc +++ b/rtgui/partialpastedlg.cc @@ -20,7 +20,7 @@ #include "multilangmgr.h" #include "paramsedited.h" -PartialPasteDlg::PartialPasteDlg (Glib::ustring title) +PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title) { set_modal (true); diff --git a/rtgui/partialpastedlg.h b/rtgui/partialpastedlg.h index 7376e1481..d22f50fad 100644 --- a/rtgui/partialpastedlg.h +++ b/rtgui/partialpastedlg.h @@ -132,9 +132,9 @@ public: sigc::connection raw_caredConn, raw_cablueConn, raw_ca_autocorrectConn, raw_hotpix_filtConn, raw_deadpix_filtConn, raw_linenoiseConn, raw_greenthreshConn, raw_ccStepsConn, raw_methodConn, raw_dcb_iterationsConn, raw_lmmse_iterationsConn, raw_dcb_enhanceConn, raw_exposConn, raw_preserConn, raw_blackConn; public: - PartialPasteDlg (Glib::ustring title); + explicit PartialPasteDlg (const Glib::ustring &title); - void applyPaste (rtengine::procparams::ProcParams* dstPP, ParamsEdited* dstPE, const rtengine::procparams::ProcParams* srcPP, const ParamsEdited* srcPE = NULL); + void applyPaste (rtengine::procparams::ProcParams* dstPP, ParamsEdited* dstPE, const rtengine::procparams::ProcParams* srcPP, const ParamsEdited* srcPE = nullptr); void everythingToggled (); void basicToggled (); diff --git a/rtgui/pcvignette.h b/rtgui/pcvignette.h index 84e4b0f57..eab1cf67d 100644 --- a/rtgui/pcvignette.h +++ b/rtgui/pcvignette.h @@ -20,9 +20,9 @@ public: PCVignette (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/perspective.h b/rtgui/perspective.h index d6a1a97c9..434df2b3f 100644 --- a/rtgui/perspective.h +++ b/rtgui/perspective.h @@ -34,9 +34,9 @@ public: PerspCorrection (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/pointermotionlistener.h b/rtgui/pointermotionlistener.h index 46eb42476..09a9b3b4f 100644 --- a/rtgui/pointermotionlistener.h +++ b/rtgui/pointermotionlistener.h @@ -21,11 +21,26 @@ class PointerMotionListener { +protected: + sigc::signal sig_cycle_rgb; + sigc::signal sig_cycle_hsv; public: -// virtual void pointerMoved (bool validPos, int x, int y, int r, int g, int b) {} + virtual ~PointerMotionListener() {} virtual void pointerMoved (bool validPos, Glib::ustring profile, Glib::ustring profileW, int x, int y, int r, int g, int b) {} virtual void toggleFreeze () {} + virtual void getRGBText (int r, int g, int b, Glib::ustring &sR, Glib::ustring &sG, Glib::ustring &sB) { sR = "--"; sG = "--"; sB = "--"; } + virtual void getHSVText (float h, float s, float v, Glib::ustring &sH, Glib::ustring &sS, Glib::ustring &sV) { sH = "--"; sS = "--"; sV = "--"; } + virtual void getLABText (float l, float a, float b, Glib::ustring &sL, Glib::ustring &sA, Glib::ustring &sB) { sL = "--"; sA = "--"; sB = "--"; } + + sigc::signal signal_cycle_rgb() + { + return sig_cycle_rgb; + } + sigc::signal signal_cycle_hsv() + { + return sig_cycle_hsv; + } }; #endif diff --git a/rtgui/popupcommon.cc b/rtgui/popupcommon.cc index 24af17213..ee56c915b 100644 --- a/rtgui/popupcommon.cc +++ b/rtgui/popupcommon.cc @@ -26,8 +26,8 @@ PopUpCommon::PopUpCommon (Gtk::Button* thisButton, const Glib::ustring& label) : selected (-1) // -1 means that the button is invalid - , menu (0) - , buttonImage (0) + , menu (nullptr) + , buttonImage (nullptr) { button = thisButton; hasMenu = false; diff --git a/rtgui/popuptogglebutton.h b/rtgui/popuptogglebutton.h index 930fae4f2..58a7ff82a 100644 --- a/rtgui/popuptogglebutton.h +++ b/rtgui/popuptogglebutton.h @@ -28,7 +28,7 @@ class PopUpToggleButton : public Gtk::ToggleButton, public PopUpCommon { public: - PopUpToggleButton (const Glib::ustring& label = ""); + explicit PopUpToggleButton (const Glib::ustring& label = ""); void show (); void set_tooltip_text (const Glib::ustring &text); }; diff --git a/rtgui/pparamschangelistener.h b/rtgui/pparamschangelistener.h index 2fac8e8bd..ff55eea00 100644 --- a/rtgui/pparamschangelistener.h +++ b/rtgui/pparamschangelistener.h @@ -28,7 +28,7 @@ class PParamsChangeListener public: virtual ~PParamsChangeListener() {} - virtual void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = NULL) {} + virtual void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = nullptr) {} virtual void clearParamChanges () {} }; diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 14c9cb0eb..30d9d5ed2 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -33,10 +33,10 @@ extern Options options; extern Glib::ustring argv0; -Preferences::Preferences (RTWindow *rtwindow) : rprofiles(NULL), iprofiles(NULL), parent(rtwindow) +Preferences::Preferences (RTWindow *rtwindow) : rprofiles(nullptr), iprofiles(nullptr), parent(rtwindow) { - splash = NULL; + splash = nullptr; set_title (M("MAIN_BUTTON_PREFERENCES")); @@ -105,8 +105,7 @@ Preferences::~Preferences () { profileStore.removeListener(this); - options.preferencesWidth = get_width(); - options.preferencesHeight = get_height(); + get_size(options.preferencesWidth, options.preferencesHeight); } Gtk::Widget* Preferences::getBatchProcPanel () @@ -609,9 +608,10 @@ Gtk::Widget* Preferences::getPerformancePanel () rgbDenoiseTreadLimitSB->set_digits (0); rgbDenoiseTreadLimitSB->set_increments (1, 5); rgbDenoiseTreadLimitSB->set_max_length(2); // Will this be sufficient? :) - int maxThreadNumber = 10; #ifdef _OPENMP - maxThreadNumber = omp_get_max_threads(); + int maxThreadNumber = omp_get_max_threads(); +#else + int maxThreadNumber = 10; #endif rgbDenoiseTreadLimitSB->set_range (0, maxThreadNumber); threadLimitHB->pack_start (*RGBDTLl, Gtk::PACK_SHRINK, 2); @@ -698,15 +698,19 @@ Gtk::Widget* Preferences::getColorManagementPanel () monProfile->append_text (M("PREFERENCES_PROFILE_NONE")); monProfile->set_active (0); - const std::vector profiles = rtengine::ICCStore::getInstance ()->getProfiles (); + const std::vector profiles = rtengine::ICCStore::getInstance ()->getProfiles (true); for (std::vector::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile) monProfile->append_text (*profile); - monIntent->append_text (M("PREFERENCES_INTENT_RELATIVE")); + // same order as the enum monIntent->append_text (M("PREFERENCES_INTENT_PERCEPTUAL")); + monIntent->append_text (M("PREFERENCES_INTENT_RELATIVE")); monIntent->append_text (M("PREFERENCES_INTENT_ABSOLUTE")); monIntent->set_active (1); + monBPC = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_MONBPC"))); + monBPC->set_active (true); + iccDir->signal_selection_changed ().connect (sigc::mem_fun (this, &Preferences::iccDirChanged)); #if defined(WIN32) // Auto-detection not implemented for Linux, see issue 851 @@ -717,21 +721,23 @@ Gtk::Widget* Preferences::getColorManagementPanel () Gtk::Table* colt = Gtk::manage (new Gtk::Table (3, 2)); int row = 0; colt->attach (*pdlabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2); - colt->attach (*iccDir, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); + colt->attach (*iccDir, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); #if !defined(__APPLE__) // monitor profile not supported on apple ++row; colt->attach (*mplabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2); - colt->attach (*monProfile, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); + colt->attach (*monProfile, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); #if defined(WIN32) ++row; - colt->attach (*cbAutoMonProfile, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); + colt->attach (*cbAutoMonProfile, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); #endif #endif ++row; colt->attach (*milabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2); - colt->attach (*monIntent, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); + colt->attach (*monIntent, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); mvbcm->pack_start (*colt, Gtk::PACK_SHRINK, 4); + mvbcm->pack_start (*monBPC, Gtk::PACK_SHRINK, 4); + #if defined(WIN32) autoMonProfileToggled(); #endif @@ -931,14 +937,20 @@ Gtk::Widget* Preferences::getGeneralPanel () hbtheme->pack_start (*fontbutton); vbftheme->pack_start(*hbtheme, Gtk::PACK_SHRINK, 0); + Gtk::Label* cpfontlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTFONT_COLPICKER") + ":", Gtk::ALIGN_RIGHT) ); + colorPickerFontButton = Gtk::manage( new Gtk::FontButton ()); + colorPickerFontButton->set_use_size(true); + colorPickerFontButton->set_font_name(options.colorPickerFont); Gtk::HBox* hbcolorchooser = Gtk::manage( new Gtk::HBox () ); hbcolorchooser->set_spacing(4); hbcolorchooser->pack_start (*cutOverlayLabel, Gtk::PACK_SHRINK, 0); hbcolorchooser->pack_start (*butCropCol, Gtk::PACK_SHRINK, 0); - hbcolorchooser->pack_end (*butNavGuideCol, Gtk::PACK_SHRINK, 0); - hbcolorchooser->pack_end (*navGuideLabel, Gtk::PACK_SHRINK, 0); + hbcolorchooser->pack_start (*navGuideLabel, Gtk::PACK_SHRINK, 0); + hbcolorchooser->pack_start (*butNavGuideCol, Gtk::PACK_SHRINK, 0); + hbcolorchooser->pack_start (*cpfontlab, Gtk::PACK_EXPAND_WIDGET, 0); + hbcolorchooser->pack_start (*colorPickerFontButton, Gtk::PACK_EXPAND_WIDGET, 0); vbftheme->pack_start(*hbcolorchooser, Gtk::PACK_SHRINK, 0); @@ -1343,7 +1355,7 @@ void Preferences::parseDir (Glib::ustring dirname, std::vector& i } // process directory - Glib::Dir* dir = NULL; + Glib::Dir* dir = nullptr; try { dir = new Glib::Dir (dirname); @@ -1414,6 +1426,7 @@ void Preferences::storePreferences () moptions.navGuideBrush[3] = butNavGuideCol->get_alpha() / 65535.0; moptions.font = fontbutton->get_font_name(); + moptions.colorPickerFont = colorPickerFontButton->get_font_name(); #ifdef WIN32 moptions.gimpDir = gimpDir->get_filename (); moptions.psDir = psDir->get_filename (); @@ -1449,15 +1462,16 @@ void Preferences::storePreferences () switch (monIntent->get_active_row_number ()) { default: case 0: - moptions.rtSettings.monitorIntent = rtengine::RI_RELATIVE; + moptions.rtSettings.monitorIntent = rtengine::RI_PERCEPTUAL; break; case 1: - moptions.rtSettings.monitorIntent = rtengine::RI_PERCEPTUAL; + moptions.rtSettings.monitorIntent = rtengine::RI_RELATIVE; break; case 2: moptions.rtSettings.monitorIntent = rtengine::RI_ABSOLUTE; break; } + moptions.rtSettings.monitorBPC = monBPC->get_active (); #if defined(WIN32) moptions.rtSettings.autoMonitorProfile = cbAutoMonProfile->get_active (); #endif @@ -1578,16 +1592,17 @@ void Preferences::fillPreferences () setActiveTextOrIndex (*monProfile, moptions.rtSettings.monitorProfile, 0); switch (moptions.rtSettings.monitorIntent) { default: - case rtengine::RI_RELATIVE: + case rtengine::RI_PERCEPTUAL: monIntent->set_active (0); break; - case rtengine::RI_PERCEPTUAL: + case rtengine::RI_RELATIVE: monIntent->set_active (1); break; case rtengine::RI_ABSOLUTE: monIntent->set_active (2); break; } + monBPC->set_active (moptions.rtSettings.monitorBPC); #if defined(WIN32) cbAutoMonProfile->set_active(moptions.rtSettings.autoMonitorProfile); #endif @@ -1629,6 +1644,7 @@ void Preferences::fillPreferences () butNavGuideCol->set_alpha ( (unsigned short)(moptions.navGuideBrush[3] * 65535.0)); fontbutton->set_font_name(moptions.font); + colorPickerFontButton->set_font_name(moptions.colorPickerFont); showDateTime->set_active (moptions.fbShowDateTime); showBasicExif->set_active (moptions.fbShowBasicExif); showExpComp->set_active (moptions.fbShowExpComp); @@ -2034,7 +2050,7 @@ void Preferences::switchThemeTo(Glib::ustring newTheme, bool slimInterface) #endif Gtk::RC::reparse_all (Gtk::Settings::get_default()); - GdkEventClient event = { GDK_CLIENT_EVENT, NULL, TRUE, gdk_atom_intern("_GTK_READ_RCFILES", FALSE), 8 }; + GdkEventClient event = { GDK_CLIENT_EVENT, nullptr, TRUE, gdk_atom_intern("_GTK_READ_RCFILES", FALSE), 8 }; gdk_event_send_clientmessage_toall ((GdkEvent*)&event); } @@ -2088,7 +2104,7 @@ void Preferences::switchFontTo(Glib::ustring newFont) Gtk::RC::parse_string (Glib::ustring::compose( "style \"clearlooks-default\" { font_name = \"%1\" }", newFont)); Gtk::RC::reparse_all (Gtk::Settings::get_default()); - GdkEventClient event = { GDK_CLIENT_EVENT, NULL, TRUE, gdk_atom_intern("_GTK_READ_RCFILES", FALSE), 8 }; + GdkEventClient event = { GDK_CLIENT_EVENT, nullptr, TRUE, gdk_atom_intern("_GTK_READ_RCFILES", FALSE), 8 }; gdk_event_send_clientmessage_toall ((GdkEvent*)&event); } @@ -2213,7 +2229,7 @@ void Preferences::updateFFinfos() bool Preferences::splashClosed(GdkEventAny* event) { delete splash; - splash = NULL; + splash = nullptr; return true; } diff --git a/rtgui/preferences.h b/rtgui/preferences.h index 1cfb435cf..a94601663 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -97,6 +97,7 @@ protected: Gtk::FileChooserButton* iccDir; Gtk::ComboBoxText* monProfile; Gtk::ComboBoxText* monIntent; + Gtk::CheckButton* monBPC; Gtk::CheckButton* cbAutoMonProfile; //Gtk::CheckButton* cbAutocielab; Gtk::CheckButton* cbciecamfloat; @@ -131,6 +132,7 @@ protected: Gtk::HBox* hbtheme; Gtk::CheckButton* chUseSystemTheme; Gtk::FontButton* fontbutton; + Gtk::FontButton* colorPickerFontButton; Gtk::ColorButton* butCropCol; Gtk::ColorButton* butNavGuideCol; @@ -229,7 +231,7 @@ protected: Gtk::Widget* getSoundPanel (); public: - Preferences (RTWindow *rtwindow); + explicit Preferences (RTWindow *rtwindow); ~Preferences (); void savePressed (); diff --git a/rtgui/preprocess.h b/rtgui/preprocess.h index 8faf647a4..856a9a25e 100644 --- a/rtgui/preprocess.h +++ b/rtgui/preprocess.h @@ -40,8 +40,8 @@ public: PreProcess (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); //void setBatchMode (bool batchMode); //void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL); diff --git a/rtgui/previewhandler.cc b/rtgui/previewhandler.cc index e6ef30bca..650e323eb 100644 --- a/rtgui/previewhandler.cc +++ b/rtgui/previewhandler.cc @@ -23,7 +23,7 @@ using namespace rtengine; using namespace rtengine::procparams; -PreviewHandler::PreviewHandler () : image(NULL), previewScale(1.) +PreviewHandler::PreviewHandler () : image(nullptr), previewScale(1.) { pih = new PreviewHandlerIdleHelper; @@ -121,7 +121,7 @@ int delImageUI (void* data) if (pih->phandler->image) { IImage8* oldImg = pih->phandler->image; oldImg->getMutex().lock (); - pih->phandler->image = NULL; + pih->phandler->image = nullptr; oldImg->getMutex().unlock (); } diff --git a/rtgui/previewloader.cc b/rtgui/previewloader.cc index 02082f7a7..4bdffc512 100644 --- a/rtgui/previewloader.cc +++ b/rtgui/previewloader.cc @@ -29,7 +29,8 @@ #define DEBUG(format,args...) //#define DEBUG(format,args...) printf("PreviewLoader::%s: " format "\n", __FUNCTION__, ## args) -class PreviewLoader::Impl +class PreviewLoader::Impl : + public rtengine::NonCopyable { public: struct Job { @@ -41,7 +42,7 @@ public: Job(): dir_id_(0), - listener_(0) + listener_(nullptr) {} int dir_id_; @@ -72,9 +73,10 @@ public: Impl(): nConcurrentThreads(0) { - int threadCount = 2; #ifdef _OPENMP - threadCount = omp_get_num_procs(); + int threadCount = omp_get_num_procs(); +#else + int threadCount = 2; #endif threadPool_ = new Glib::ThreadPool(threadCount, 0); @@ -120,7 +122,7 @@ public: // if something got // Issue 2406 FileBrowserEntry* fdn = 0; try { - Thumbnail* tmb = 0; + Thumbnail* tmb = nullptr; { if (Glib::file_test(j.dir_entry_, Glib::FILE_TEST_EXISTS)) { tmb = cacheMgr->getEntry(j.dir_entry_); @@ -165,7 +167,7 @@ PreviewLoader::PreviewLoader(): { } -PreviewLoader* PreviewLoader::getInstance(void) +PreviewLoader* PreviewLoader::getInstance() { static PreviewLoader instance_; return &instance_; @@ -174,7 +176,7 @@ PreviewLoader* PreviewLoader::getInstance(void) void PreviewLoader::add(int dir_id, const Glib::ustring& dir_entry, PreviewLoaderListener* l) { // somebody listening? - if ( l != 0 ) { + if ( l != nullptr ) { { MyMutex::MyLock lock(impl_->mutex_); @@ -189,7 +191,7 @@ void PreviewLoader::add(int dir_id, const Glib::ustring& dir_entry, PreviewLoade } } -void PreviewLoader::removeAllJobs(void) +void PreviewLoader::removeAllJobs() { DEBUG("stop %d", impl_->nConcurrentThreads); MyMutex::MyLock lock(impl_->mutex_); diff --git a/rtgui/previewloader.h b/rtgui/previewloader.h index 762776ae7..d5207cd44 100644 --- a/rtgui/previewloader.h +++ b/rtgui/previewloader.h @@ -21,11 +21,17 @@ #include #include + +#include "../rtengine/noncopyable.h" + #include "filebrowserentry.h" class PreviewLoaderListener { public: + virtual ~PreviewLoaderListener() + { + } /** * @brief a preview is ready @@ -33,18 +39,22 @@ public: * @param dir_id directory ID this is for * @param fd entry */ - virtual void previewReady (int dir_id, FileBrowserEntry* fd) {} + virtual void previewReady(int dir_id, FileBrowserEntry* fd) + { + } /** * @brief all previews have finished loading */ - virtual void previewsFinished (int dir_id_) {} + virtual void previewsFinished(int dir_id_) + { + } }; -class PreviewLoader +class PreviewLoader : + public rtengine::NonCopyable { public: - /** * @brief Singleton entry point. * diff --git a/rtgui/previewmodepanel.cc b/rtgui/previewmodepanel.cc index 63989809d..601103fa8 100644 --- a/rtgui/previewmodepanel.cc +++ b/rtgui/previewmodepanel.cc @@ -88,9 +88,9 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia) previewL->set_active (false); previewFocusMask->set_active (false); - backColor0->set_active (options.bgcolor == 0 ? true : false); - backColor1->set_active (options.bgcolor == 1 ? true : false); - backColor2->set_active (options.bgcolor == 2 ? true : false); + backColor0->set_active (options.bgcolor == 0); + backColor1->set_active (options.bgcolor == 1); + backColor2->set_active (options.bgcolor == 2); vbbackColor = Gtk::manage (new Gtk::VBox ()); vbbackColor->set_border_width (0); @@ -220,7 +220,7 @@ void PreviewModePanel::buttonToggled (Gtk::ToggleButton* tbpreview) // this will redraw the linked Before image area // which is set when before/after view is enabled - if (imageArea->iLinkedImageArea != NULL) { + if (imageArea->iLinkedImageArea != nullptr) { imageArea->iLinkedImageArea->queue_draw (); } } @@ -304,7 +304,7 @@ void PreviewModePanel::buttonToggled_backColor (Gtk::ToggleButton* tbbackColor) // this will redraw the linked Before image area // which is set when before/after view is enabled - if (imageArea->iLinkedImageArea != NULL) { + if (imageArea->iLinkedImageArea != nullptr) { imageArea->iLinkedImageArea->queue_draw (); } } diff --git a/rtgui/previewmodepanel.h b/rtgui/previewmodepanel.h index 10906c30f..d3bf3c8e4 100644 --- a/rtgui/previewmodepanel.h +++ b/rtgui/previewmodepanel.h @@ -47,7 +47,7 @@ protected: Gtk::Image* iBC2, *igBC2; public: - PreviewModePanel (ImageArea* ia); + explicit PreviewModePanel (ImageArea* ia); ~PreviewModePanel(); void toggleR (); diff --git a/rtgui/previewwindow.cc b/rtgui/previewwindow.cc index ea419427b..7d4eaaa0a 100644 --- a/rtgui/previewwindow.cc +++ b/rtgui/previewwindow.cc @@ -21,7 +21,7 @@ #include "imagearea.h" #include "cursormanager.h" -PreviewWindow::PreviewWindow () : previewHandler(NULL), mainCropWin(NULL), imageArea(NULL), imgX(0), imgY(0), imgW(0), imgH(0), zoom(0.0), isMoving(false), needsUpdate(false) +PreviewWindow::PreviewWindow () : previewHandler(nullptr), mainCropWin(nullptr), imageArea(nullptr), imgX(0), imgY(0), imgW(0), imgH(0), zoom(0.0), isMoving(false), needsUpdate(false) { rconn = signal_size_allocate().connect( sigc::mem_fun(*this, &PreviewWindow::on_resized) ); @@ -223,10 +223,10 @@ bool PreviewWindow::on_button_press_event (GdkEventButton* event) int x, y, w, h; getObservedFrameArea (x, y, w, h); if (x>imgX || y>imgY || w < imgW || h < imgH) { - bool inside = event->x > x - 6 && event->x < x + w - 1 + 6 && event->y > y - 6 && event->y < y + h - 1 + 6; - bool moreInside = event->x > x + 6 && event->x < x + w - 1 - 6 && event->y > y + 6 && event->y < y + h - 1 - 6; if (!isMoving) { + bool inside = event->x > x - 6 && event->x < x + w - 1 + 6 && event->y > y - 6 && event->y < y + h - 1 + 6; + bool moreInside = event->x > x + 6 && event->x < x + w - 1 - 6 && event->y > y + 6 && event->y < y + h - 1 - 6; isMoving = true; if (!inside || moreInside) { diff --git a/rtgui/profilechangelistener.h b/rtgui/profilechangelistener.h index 0f6870c2d..b3baa62d7 100644 --- a/rtgui/profilechangelistener.h +++ b/rtgui/profilechangelistener.h @@ -27,7 +27,7 @@ class ProfileChangeListener public: virtual ~ProfileChangeListener() {} - virtual void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = NULL) {} + virtual void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = nullptr) {} virtual void setDefaults (rtengine::procparams::ProcParams* defparams) {} }; diff --git a/rtgui/profilepanel.cc b/rtgui/profilepanel.cc index 5974b2242..ad1cfccc3 100644 --- a/rtgui/profilepanel.cc +++ b/rtgui/profilepanel.cc @@ -39,10 +39,10 @@ void ProfilePanel::cleanup () delete partialProfileDlg; } -ProfilePanel::ProfilePanel (bool readOnly) : storedPProfile(NULL), lastFilename(""), imagePath("") +ProfilePanel::ProfilePanel (bool readOnly) : storedPProfile(nullptr), lastFilename(""), imagePath("") { - tpc = NULL; + tpc = nullptr; profileFillModeOnImage = new RTImage("profile-filled.png"); profileFillModeOffImage = new RTImage("profile-partial.png"); @@ -109,8 +109,8 @@ ProfilePanel::ProfilePanel (bool readOnly) : storedPProfile(NULL), lastFilename( paste->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &ProfilePanel::paste_clicked) ); - custom = NULL; - lastsaved = NULL; + custom = nullptr; + lastsaved = nullptr; dontupdate = false; profileStore.addListener(this); @@ -153,20 +153,12 @@ ProfilePanel::~ProfilePanel () bool ProfilePanel::isCustomSelected() { - if (profiles->getCurrentLabel() == Glib::ustring ("(" + M("PROFILEPANEL_PCUSTOM") + ")")) { - return true; - } - - return false; + return profiles->getCurrentLabel() == Glib::ustring ("(" + M("PROFILEPANEL_PCUSTOM") + ")"); } bool ProfilePanel::isLastSavedSelected() { - if (profiles->getCurrentLabel() == Glib::ustring ("(" + M("PROFILEPANEL_PLASTSAVED") + ")")) { - return true; - } - - return false; + return profiles->getCurrentLabel() == Glib::ustring ("(" + M("PROFILEPANEL_PLASTSAVED") + ")"); } Gtk::TreeIter ProfilePanel::getCustomRow() @@ -217,7 +209,7 @@ void ProfilePanel::storeCurrentValue () const ProfileStoreEntry *entry = profiles->getSelectedEntry(); const PartialProfile *currProfile; - if (entry && (currProfile = profileStore.getProfile(entry)) != NULL) { + if (entry && (currProfile = profileStore.getProfile(entry)) != nullptr) { // now storedPProfile has the current entry's values storedPProfile = new PartialProfile(currProfile->pparams, currProfile->pedited, true); } else { @@ -276,7 +268,7 @@ void ProfilePanel::restoreValue () if (storedPProfile) { storedPProfile->deleteInstance(); delete storedPProfile; - storedPProfile = NULL; + storedPProfile = nullptr; } } @@ -345,7 +337,7 @@ void ProfilePanel::save_clicked (GdkEventButton* event) toSave = lastsaved; } else { const ProfileStoreEntry* entry = profiles->getSelectedEntry(); - toSave = entry ? profileStore.getProfile (profiles->getSelectedEntry()) : NULL; + toSave = entry ? profileStore.getProfile (profiles->getSelectedEntry()) : nullptr; } if (toSave) { @@ -415,7 +407,7 @@ void ProfilePanel::copy_clicked (GdkEventButton* event) toSave = lastsaved; } else { const ProfileStoreEntry* entry = profiles->getSelectedEntry(); - toSave = entry ? profileStore.getProfile (entry) : NULL; + toSave = entry ? profileStore.getProfile (entry) : nullptr; } // toSave has to be a complete procparams @@ -529,7 +521,7 @@ void ProfilePanel::load_clicked (GdkEventButton* event) if (event->state & Gdk::CONTROL_MASK) // custom.pparams = loadedFile.pparams filtered by ( loadedFile.pedited & partialPaste.pedited ) { - partialProfileDlg->applyPaste (custom->pparams, !fillMode->get_active() ? custom->pedited : NULL, &pp, &pe); + partialProfileDlg->applyPaste (custom->pparams, !fillMode->get_active() ? custom->pedited : nullptr, &pp, &pe); } else { // custom.pparams = loadedFile.pparams filtered by ( loadedFile.pedited ) pe.combine(*custom->pparams, pp, true); @@ -544,7 +536,7 @@ void ProfilePanel::load_clicked (GdkEventButton* event) // we delete custom custom->deleteInstance(); delete custom; - custom = NULL; + custom = nullptr; } } @@ -628,7 +620,7 @@ void ProfilePanel::paste_clicked (GdkEventButton* event) if (event->state & Gdk::CONTROL_MASK) // custom.pparams = clipboard.pparams filtered by ( clipboard.pedited & partialPaste.pedited ) { - partialProfileDlg->applyPaste (custom->pparams, !fillMode->get_active() ? custom->pedited : NULL, &pp, &pe); + partialProfileDlg->applyPaste (custom->pparams, !fillMode->get_active() ? custom->pedited : nullptr, &pp, &pe); } else { // custom.pparams = clipboard.pparams filtered by ( clipboard.pedited ) pe.combine(*custom->pparams, pp, true); @@ -641,7 +633,7 @@ void ProfilePanel::paste_clicked (GdkEventButton* event) if (event->state & Gdk::CONTROL_MASK) // custom.pparams = clipboard.pparams filtered by ( partialPaste.pedited ) { - partialProfileDlg->applyPaste (custom->pparams, NULL, &pp, NULL); + partialProfileDlg->applyPaste (custom->pparams, nullptr, &pp, nullptr); } else { // custom.pparams = clipboard.pparams non filtered *custom->pparams = pp; @@ -738,21 +730,21 @@ void ProfilePanel::procParamsChanged (rtengine::procparams::ProcParams* p, rteng void ProfilePanel::initProfile (const Glib::ustring& profileFullPath, ProcParams* lastSaved) { - const ProfileStoreEntry *pse = NULL; - const PartialProfile *defprofile = NULL; + const ProfileStoreEntry *pse = nullptr; + const PartialProfile *defprofile = nullptr; bool ccPrevState = changeconn.block(true); if (custom) { custom->deleteInstance(); delete custom; - custom = NULL; + custom = nullptr; } if (lastsaved) { lastsaved->deleteInstance(); delete lastsaved; - lastsaved = NULL; + lastsaved = nullptr; } if (lastSaved) { diff --git a/rtgui/profilepanel.h b/rtgui/profilepanel.h index 9bcc79196..b0b1ac021 100644 --- a/rtgui/profilepanel.h +++ b/rtgui/profilepanel.h @@ -69,7 +69,7 @@ protected: public: - ProfilePanel (bool readOnly = false); + explicit ProfilePanel (bool readOnly = false); virtual ~ProfilePanel (); void setProfileChangeListener (ProfileChangeListener* ppl) @@ -87,7 +87,7 @@ public: void setInitialFileName (const Glib::ustring& filename); // PParamsChangeListener interface - void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = NULL); + void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = nullptr); // gui callbacks void save_clicked (GdkEventButton* event); diff --git a/rtgui/profilestore.cc b/rtgui/profilestore.cc index acbbfba63..c80bbe388 100644 --- a/rtgui/profilestore.cc +++ b/rtgui/profilestore.cc @@ -26,7 +26,7 @@ ProfileStore profileStore; using namespace rtengine; using namespace rtengine::procparams; -ProfileStore::ProfileStore () : parseMutex(NULL), storeState(STORESTATE_NOTINITIALIZED), internalDefaultProfile(NULL), internalDefaultEntry(NULL) +ProfileStore::ProfileStore () : parseMutex(nullptr), storeState(STORESTATE_NOTINITIALIZED), internalDefaultProfile(nullptr), internalDefaultEntry(nullptr) { internalDefaultProfile = new AutoPartialProfile(); internalDefaultProfile->set(true); @@ -65,7 +65,7 @@ ProfileStore::~ProfileStore () delete internalDefaultProfile; lock.release(); delete parseMutex; - parseMutex = NULL; + parseMutex = nullptr; } /* @@ -142,7 +142,7 @@ void ProfileStore::_parseProfiles () // Check if the default profiles has been found. - if (findEntryFromFullPathU(options.defProfRaw) == NULL) { + if (findEntryFromFullPathU(options.defProfRaw) == nullptr) { options.setDefProfRawMissing(true); if (options.rtSettings.verbose) { @@ -150,7 +150,7 @@ void ProfileStore::_parseProfiles () } } - if (findEntryFromFullPathU(options.defProfImg) == NULL) { + if (findEntryFromFullPathU(options.defProfImg) == nullptr) { options.setDefProfImgMissing(true); if (options.rtSettings.verbose) { @@ -164,10 +164,10 @@ bool ProfileStore::parseDir (Glib::ustring& realPath, Glib::ustring& virtualPath { bool fileFound = false; - unsigned int folder = 0; // folder's own Id // reload the available profiles from the profile dir if (!realPath.empty() && Glib::file_test(realPath, Glib::FILE_TEST_EXISTS) && Glib::file_test (realPath, Glib::FILE_TEST_IS_DIR)) { + unsigned int folder = 0; // folder's own Id // add this entry to the folder list folders.push_back(virtualPath); @@ -186,7 +186,7 @@ bool ProfileStore::parseDir (Glib::ustring& realPath, Glib::ustring& virtualPath } // walking through the directory - Glib::Dir* dir = NULL; + Glib::Dir* dir = nullptr; dir = new Glib::Dir (realPath); for (Glib::DirIterator i = dir->begin(); i != dir->end(); ++i) { @@ -271,7 +271,7 @@ const ProfileStoreEntry* ProfileStore::findEntryFromFullPathU(Glib::ustring path { if (path.empty()) { - return NULL; + return nullptr; } if (path == DEFPROFILE_INTERNAL) { @@ -298,7 +298,7 @@ const ProfileStoreEntry* ProfileStore::findEntryFromFullPathU(Glib::ustring path path = path.substr(0, path.length() - fName.length()); } else { // path is malformed, returning NULL; - return NULL; + return nullptr; } path = Glib::path_get_dirname(path); @@ -307,7 +307,7 @@ const ProfileStoreEntry* ProfileStore::findEntryFromFullPathU(Glib::ustring path int parentFolderId = findFolderId(path); if (parentFolderId == -1) { - return NULL; + return nullptr; } // 2. find the entry that match the given filename and parentFolderId @@ -317,7 +317,7 @@ const ProfileStoreEntry* ProfileStore::findEntryFromFullPathU(Glib::ustring path } } - return NULL; + return nullptr; } /** Protected version of findEntryFromFullPathU */ @@ -333,13 +333,13 @@ const PartialProfile* ProfileStore::getProfile (Glib::ustring path) if (!init()) // I don't even know if this situation can occur { - return NULL; + return nullptr; } const ProfileStoreEntry *pse = findEntryFromFullPath(path); if (!pse) { - return NULL; + return nullptr; } return getProfile(pse); @@ -351,7 +351,7 @@ const PartialProfile* ProfileStore::getProfile (const ProfileStoreEntry* entry) if (!init()) // I don't even know if this situation can occur { - return NULL; + return nullptr; } MyMutex::MyLock lock(*parseMutex); @@ -369,7 +369,7 @@ const PartialProfile* ProfileStore::getProfile (const ProfileStoreEntry* entry) #ifndef NDEBUG printf("WARNING! Profile not found!\n"); #endif - return NULL; + return nullptr; } } @@ -406,7 +406,7 @@ const ProcParams* ProfileStore::getDefaultProcParams (bool isRaw) if (!init()) // I don't even know if this situation can occur { - return NULL; + return nullptr; } //Note: the mutex is locked in getProfile, called below @@ -431,7 +431,7 @@ const PartialProfile* ProfileStore::getDefaultPartialProfile (bool isRaw) if (!init()) // I don't even know if this situation can occur { - return NULL; + return nullptr; } //Note: the mutex is locked in getProfile, called below @@ -488,7 +488,7 @@ void ProfileStore::dumpFolderList() printf("Folder list:\n------------\n"); for (unsigned int i = 0; i < folders.size(); i++) { - printf(" #%3d - %s\n", i, folders.at(i).c_str()); + printf(" #%3ud - %s\n", i, folders.at(i).c_str()); } printf("\n"); @@ -538,7 +538,7 @@ const ProfileStoreEntry* ProfileStoreComboBox::getSelectedEntry() if (currRow) { return currRow[methodColumns.profileStoreEntry]; } else { - return NULL; + return nullptr; } } diff --git a/rtgui/profilestore.h b/rtgui/profilestore.h index 2928a01ef..ab45a0867 100644 --- a/rtgui/profilestore.h +++ b/rtgui/profilestore.h @@ -21,11 +21,14 @@ #include #include +#include + #include "../rtengine/rtengine.h" +#include "../rtengine/noncopyable.h" + #include "threadutils.h" #include "paramsedited.h" #include "guiutils.h" -#include /** @brief This will implement callback functions for the ProfileStore @@ -99,7 +102,7 @@ public: const ProfileStoreEntry *entry; #ifndef NDEBUG - ProfileStoreLabel() : Gtk::Label("*** error ***"), entry(NULL) {} + ProfileStoreLabel() : Gtk::Label("*** error ***"), entry(nullptr) {} #else ProfileStoreLabel() : Gtk::Label(""), entry(NULL) {} #endif @@ -108,7 +111,7 @@ public: * * @param entry Pointer to the ProfileStoreEntry object, be it a directory or a file */ - ProfileStoreLabel(const ProfileStoreEntry *entry); + explicit ProfileStoreLabel(const ProfileStoreEntry *entry); ProfileStoreLabel (const ProfileStoreLabel &other); }; @@ -118,7 +121,8 @@ public: * This store can be queried by the GUI to display a Tree of the profiles available * in the user's and system's profile directory and subdirectories. */ -class ProfileStore +class ProfileStore : + public rtengine::NonCopyable { typedef enum { @@ -177,6 +181,7 @@ public: ProfileStore(); ~ProfileStore(); + bool init (); void parseProfiles (); int findFolderId(const Glib::ustring &path); diff --git a/rtgui/progressconnector.h b/rtgui/progressconnector.h index ffa4bee67..f62b645c3 100644 --- a/rtgui/progressconnector.h +++ b/rtgui/progressconnector.h @@ -32,7 +32,7 @@ class PLDBridge : public rtengine::ProgressListener rtengine::ProgressListener* pl; public: - PLDBridge ( rtengine::ProgressListener* pb) + explicit PLDBridge ( rtengine::ProgressListener* pb) : pl(pb) {} // ProgressListener interface @@ -85,12 +85,12 @@ class ProgressConnector { retval = opStart.emit (); g_idle_add (ProgressConnector::emitEndSignalUI, new sigc::signal0 (opEnd)); - workThread = 0; + workThread = nullptr; } public: - ProgressConnector (): workThread( 0 ) { } + ProgressConnector (): retval( 0 ), workThread( nullptr ) { } void startFunc (const sigc::slot0& startHandler, const sigc::slot0& endHandler ) { diff --git a/rtgui/prsharpening.h b/rtgui/prsharpening.h index c0739b818..9bf90cc6c 100644 --- a/rtgui/prsharpening.h +++ b/rtgui/prsharpening.h @@ -58,9 +58,9 @@ public: PrSharpening (); virtual ~PrSharpening (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/rawcacorrection.h b/rtgui/rawcacorrection.h index 82df2c3af..4edf9f9f2 100644 --- a/rtgui/rawcacorrection.h +++ b/rtgui/rawcacorrection.h @@ -39,10 +39,10 @@ public: RAWCACorr (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setAdjusterBehavior (bool caadd); void trimValues (rtengine::procparams::ProcParams* pp); diff --git a/rtgui/rawexposure.h b/rtgui/rawexposure.h index 72e042892..d6e3e863f 100644 --- a/rtgui/rawexposure.h +++ b/rtgui/rawexposure.h @@ -37,10 +37,10 @@ public: RAWExposure (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void adjusterChanged (Adjuster* a, double newval); void setAdjusterBehavior (bool pexposadd, bool pexpreseradd); void trimValues (rtengine::procparams::ProcParams* pp); diff --git a/rtgui/rawprocess.cc b/rtgui/rawprocess.cc deleted file mode 100644 index 0ca4350cc..000000000 --- a/rtgui/rawprocess.cc +++ /dev/null @@ -1,303 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * Copyright (c) 2004-2010 Gabor Horvath - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RawTherapee. If not, see . - */ -#include "rawprocess.h" -#include "options.h" -#include "guiutils.h" -using namespace rtengine; -using namespace rtengine::procparams; - -RawProcess::RawProcess () : FoldableToolPanel(this) -{ - Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ()); - hb1->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_DMETHOD") + ": ")), Gtk::PACK_SHRINK, 4); - dmethod = Gtk::manage (new MyComboBoxText ()); - - for( size_t i = 0; i < procparams::RAWParams::numMethods; i++) { - dmethod->append_text(procparams::RAWParams::methodstring[i]); - } - - dmethod->set_active(0); - hb1->set_tooltip_markup (M("TP_RAW_DMETHOD_TOOLTIP")); - - hb1->pack_end (*dmethod, Gtk::PACK_EXPAND_WIDGET, 4); - pack_start( *hb1, Gtk::PACK_SHRINK, 4); - - dcbOptions = Gtk::manage (new Gtk::VBox ()); - dcbOptions->set_border_width(4); - - dcbIterations = Gtk::manage (new Adjuster (M("TP_RAW_DCBITERATIONS"), 0, 5, 1, 2)); - dcbIterations->setAdjusterListener (this); - - if (dcbIterations->delay < options.adjusterMaxDelay) { - dcbIterations->delay = options.adjusterMaxDelay; - } - - dcbIterations->show(); - dcbEnhance = Gtk::manage (new Gtk::CheckButton(M("TP_RAW_DCBENHANCE"))); - dcbOptions->pack_start(*dcbIterations); - dcbOptions->pack_start(*dcbEnhance); - pack_start( *dcbOptions, Gtk::PACK_SHRINK, 4); - - lmmseOptions = Gtk::manage (new Gtk::VBox ()); - lmmseOptions->set_border_width(4); - - lmmseIterations = Gtk::manage (new Adjuster (M("TP_RAW_LMMSEITERATIONS"), 0, 6, 1, 2)); - lmmseIterations->setAdjusterListener (this); - lmmseIterations->set_tooltip_markup (M("TP_RAW_LMMSE_TOOLTIP")); - - if (lmmseIterations->delay < options.adjusterMaxDelay) { - lmmseIterations->delay = options.adjusterMaxDelay; - } - - lmmseIterations->show(); - lmmseOptions->pack_start(*lmmseIterations); - pack_start( *lmmseOptions, Gtk::PACK_SHRINK, 4); - - pack_start( *Gtk::manage( new Gtk::HSeparator()), Gtk::PACK_SHRINK, 0 ); - ccSteps = Gtk::manage (new Adjuster (M("TP_RAW_FALSECOLOR"), 0, 5, 1, 0 )); - ccSteps->setAdjusterListener (this); - - if (ccSteps->delay < options.adjusterMaxDelay) { - ccSteps->delay = options.adjusterMaxDelay; - } - - ccSteps->show(); - pack_start( *ccSteps, Gtk::PACK_SHRINK, 4); - - //pack_start( *Gtk::manage( new Gtk::HSeparator()), Gtk::PACK_SHRINK, 0 ); - //allOptions = Gtk::manage (new Gtk::VBox ()); - //allOptions->set_border_width(2); - //allEnhance = Gtk::manage (new Gtk::CheckButton(M("TP_RAW_ALLENHANCE"))); - //allOptions->pack_start(*allEnhance); - //pack_start( *allOptions, Gtk::PACK_SHRINK, 4); - - methodconn = dmethod->signal_changed().connect( sigc::mem_fun(*this, &RawProcess::methodChanged) ); - dcbEnhconn = dcbEnhance->signal_toggled().connect ( sigc::mem_fun(*this, &RawProcess::dcbEnhanceChanged), true); - //allEnhconn = allEnhance->signal_toggled().connect ( sigc::mem_fun(*this, &RawProcess::allEnhanceChanged), true); -} - - -void RawProcess::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited) -{ - disableListener (); - methodconn.block (true); - dcbEnhconn.block (true); - //allEnhconn.block (true); - - dmethod->set_active(procparams::RAWParams::numMethods); - - for( size_t i = 0; i < procparams::RAWParams::numMethods; i++) - if( pp->raw.dmethod == procparams::RAWParams::methodstring[i]) { - dmethod->set_active(i); - oldSelection = i; - break; - } - - if(pedited ) { - ccSteps->setEditedState (pedited->raw.ccSteps ? Edited : UnEdited); - dcbIterations->setEditedState ( pedited->raw.dcbIterations ? Edited : UnEdited); - dcbEnhance->set_inconsistent(!pedited->raw.dcbEnhance); - //allEnhance->set_inconsistent(!pedited->raw.allEnhance); - lmmseIterations->setEditedState ( pedited->raw.lmmseIterations ? Edited : UnEdited); - - if( !pedited->raw.dmethod ) { - dmethod->set_active(procparams::RAWParams::numMethods); // No name - } - } - - //allEnhance->set_active(pp->raw.all_enhance); - - dcbIterations->setValue (pp->raw.dcb_iterations); - dcbEnhance->set_active(pp->raw.dcb_enhance); - ccSteps->setValue (pp->raw.ccSteps); - - if (pp->raw.dmethod == procparams::RAWParams::methodstring[procparams::RAWParams::dcb] || - dmethod->get_active_row_number() == procparams::RAWParams::numMethods) { - dcbOptions->show(); - } else { - dcbOptions->hide(); - } - - lmmseIterations->setValue (pp->raw.lmmse_iterations); - - if (pp->raw.dmethod == procparams::RAWParams::methodstring[procparams::RAWParams::lmmse] || - dmethod->get_active_row_number() == procparams::RAWParams::numMethods) { - lmmseOptions->show(); - } else { - lmmseOptions->hide(); - } - - // Flase color suppression is applied to all demozaicing method, so don't hide anything - /*if (pp->raw.dmethod == procparams::RAWParams::methodstring[procparams::RAWParams::eahd] || - pp->raw.dmethod == procparams::RAWParams::methodstring[procparams::RAWParams::hphd] || - pp->raw.dmethod == procparams::RAWParams::methodstring[procparams::RAWParams::vng4]) - ccSteps->show(); - else - ccSteps->hide();*/ - - lastDCBen = pp->raw.dcb_enhance; - //lastALLen = pp->raw.all_enhance; - - methodconn.block (false); - dcbEnhconn.block (false); - //allEnhconn.block (false); - - enableListener (); -} - -void RawProcess::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited) -{ - pp->raw.ccSteps = ccSteps->getIntValue(); - pp->raw.dcb_iterations = dcbIterations->getIntValue(); - pp->raw.dcb_enhance = dcbEnhance->get_active(); - //pp->raw.all_enhance = allEnhance->get_active(); - pp->raw.lmmse_iterations = lmmseIterations->getIntValue(); - - int currentRow = dmethod->get_active_row_number(); - - if( currentRow >= 0 && currentRow < procparams::RAWParams::numMethods) { - pp->raw.dmethod = procparams::RAWParams::methodstring[currentRow]; - } - - if (pedited) { - pedited->raw.ccSteps = ccSteps->getEditedState (); - pedited->raw.dmethod = dmethod->get_active_row_number() != procparams::RAWParams::numMethods; - pedited->raw.dcbIterations = dcbIterations->getEditedState (); - pedited->raw.dcbEnhance = !dcbEnhance->get_inconsistent(); - //pedited->raw.allEnhance = !allEnhance->get_inconsistent(); - pedited->raw.lmmseIterations = lmmseIterations->getEditedState (); - - } -} - -void RawProcess::setBatchMode(bool batchMode) -{ - dmethod->append_text (M("GENERAL_UNCHANGED")); - dmethod->set_active(procparams::RAWParams::numMethods); // No name - dcbOptions->hide(); - lmmseOptions->hide(); - ToolPanel::setBatchMode (batchMode); - ccSteps->showEditedCB (); - dcbIterations->showEditedCB (); - lmmseIterations->showEditedCB (); - -} - -void RawProcess::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited) -{ - dcbIterations->setDefault( defParams->raw.dcb_iterations); - lmmseIterations->setDefault( defParams->raw.lmmse_iterations); - ccSteps->setDefault (defParams->raw.ccSteps); - - if (pedited) { - dcbIterations->setDefaultEditedState( pedited->raw.dcbIterations ? Edited : UnEdited); - lmmseIterations->setDefaultEditedState( pedited->raw.lmmseIterations ? Edited : UnEdited); - ccSteps->setDefaultEditedState(pedited->raw.ccSteps ? Edited : UnEdited); - } else { - dcbIterations->setDefaultEditedState( Irrelevant ); - lmmseIterations->setDefaultEditedState( Irrelevant ); - ccSteps->setDefaultEditedState(Irrelevant ); - } -} - -void RawProcess::adjusterChanged (Adjuster* a, double newval) -{ - if (listener) { - if (a == dcbIterations) { - listener->panelChanged (EvDemosaicDCBIter, a->getTextValue() ); - } else if (a == ccSteps) { - listener->panelChanged (EvDemosaicFalseColorIter, a->getTextValue() ); - } else if (a == lmmseIterations) { - listener->panelChanged (EvDemosaicLMMSEIter, a->getTextValue() ); - } - - } -} - -void RawProcess::methodChanged () -{ - int curSelection = dmethod->get_active_row_number(); - - if ( curSelection == procparams::RAWParams::dcb) { - dcbOptions->show(); - } else { - dcbOptions->hide(); - } - - if ( curSelection == procparams::RAWParams::lmmse) { - lmmseOptions->show(); - } else { - lmmseOptions->hide(); - } - - Glib::ustring methodName = ""; - bool ppreq = false; - - if( curSelection >= 0 && curSelection < procparams::RAWParams::numMethods) { - methodName = procparams::RAWParams::methodstring[curSelection]; - - if (curSelection == procparams::RAWParams::mono || oldSelection == procparams::RAWParams::mono) { - ppreq = true; - } - } - - oldSelection = curSelection; - - if (listener) { - listener->panelChanged (ppreq ? EvDemosaicMethodPreProc : EvDemosaicMethod, methodName); - } -} - -void RawProcess::dcbEnhanceChanged () -{ - if (batchMode) { - if (dcbEnhance->get_inconsistent()) { - dcbEnhance->set_inconsistent (false); - dcbEnhconn.block (true); - dcbEnhance->set_active (false); - dcbEnhconn.block (false); - } else if (lastDCBen) { - dcbEnhance->set_inconsistent (true); - } - - lastDCBen = dcbEnhance->get_active (); - } - - if (listener) { - listener->panelChanged (EvDemosaicDCBEnhanced, dcbEnhance->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); - } -} - -/*void RawProcess::allEnhanceChanged () -{ - if (batchMode) { - if (allEnhance->get_inconsistent()) { - allEnhance->set_inconsistent (false); - allEnhconn.block (true); - allEnhance->set_active (false); - allEnhconn.block (false); - } - else if (lastALLen) - allEnhance->set_inconsistent (true); - - lastALLen = allEnhance->get_active (); - } - if (listener) - listener->panelChanged (EvDemosaicALLEnhanced, allEnhance->get_active()?M("GENERAL_ENABLED"):M("GENERAL_DISABLED")); -}*/ diff --git a/rtgui/rawprocess.h b/rtgui/rawprocess.h deleted file mode 100644 index 85c1c9f44..000000000 --- a/rtgui/rawprocess.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * Copyright (c) 2004-2010 Gabor Horvath - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RawTherapee. If not, see . - */ -#ifndef _RAWPROCESS_H_ -#define _RAWPROCESS_H_ - -#include -#include "adjuster.h" -#include "guiutils.h" -#include "toolpanel.h" - - -class RawProcess : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel -{ - -protected: - - MyComboBoxText* dmethod; - Gtk::Label* methodl; - Adjuster* ccSteps; - Gtk::VBox *dcbOptions; - Adjuster* dcbIterations; - Gtk::CheckButton* dcbEnhance; - //Gtk::VBox *allOptions; - //Gtk::CheckButton* allEnhance; - Gtk::VBox *lmmseOptions; - Adjuster* lmmseIterations; - - bool lastDCBen; - int oldSelection; - //bool lastALLen; - sigc::connection methodconn, dcbEnhconn; //,allEnhconn; -public: - - RawProcess (); - - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); - - void methodChanged (); - void adjusterChanged (Adjuster* a, double newval); - void dcbEnhanceChanged(); - //void allEnhanceChanged(); - -}; - -#endif diff --git a/rtgui/renamedlg.cc b/rtgui/renamedlg.cc index a33011f09..e51ada336 100644 --- a/rtgui/renamedlg.cc +++ b/rtgui/renamedlg.cc @@ -22,7 +22,7 @@ #include "rtimage.h" RenameDialog::RenameDialog (Gtk::Window* parent) - : Gtk::Dialog (M("FILEBROWSER_RENAMEDLGLABEL"), *parent, true, true), p(parent), imageData(NULL) + : Gtk::Dialog (M("FILEBROWSER_RENAMEDLGLABEL"), *parent, true, true), p(parent), imageData(nullptr) { Gtk::Table* names = Gtk::manage (new Gtk::Table (2, 2)); @@ -88,159 +88,159 @@ Glib::ustring RenameDialog::getNewName () return newName->get_text (); } -void RenameDialog::fillTemplateList () -{ +//void RenameDialog::fillTemplateList () +//{ +// +// templateModel->clear (); +// +// for (size_t i = 0; i < options.renameTemplates.size(); i++) { +// Gtk::TreeModel::iterator iter = templateModel->append (); +// iter->set_value (templateColumns.tmplName, options.renameTemplates[i]); +// iter->set_value (templateColumns.rowSeparator, false); +// } +// +// // append separator and the manage... item +// Gtk::TreeModel::iterator iter = templateModel->append (); +// iter->set_value (templateColumns.tmplName, Glib::ustring("")); +// iter->set_value (templateColumns.rowSeparator, true); +// iter = templateModel->append (); +// iter->set_value (templateColumns.tmplName, Glib::ustring(M("FILEBROWSER_ADDDELTEMPLATE"))); +// iter->set_value (templateColumns.rowSeparator, false); +//} - templateModel->clear (); +//bool RenameDialog::rowSeparatorFunc (const Glib::RefPtr& model, const Gtk::TreeModel::iterator& iter) +//{ +// +// return iter->get_value (templateColumns.rowSeparator); +//} - for (size_t i = 0; i < options.renameTemplates.size(); i++) { - Gtk::TreeModel::iterator iter = templateModel->append (); - iter->set_value (templateColumns.tmplName, options.renameTemplates[i]); - iter->set_value (templateColumns.rowSeparator, false); - } +//void RenameDialog::useTemplToggled () +//{ +// +// templates->set_sensitive (useTmpl->get_active ()); +// +// if (useTmpl->get_active () && isTemplSelected ()) { +// all->set_sensitive (true); +// newName->set_text (applyTemplate (oldName->get_text(), imageData, getActiveTemplate())); +// } else { +// all->set_sensitive (false); +// } +// +// newName->select_region (0, newName->get_text().size()); +//} - // append separator and the manage... item - Gtk::TreeModel::iterator iter = templateModel->append (); - iter->set_value (templateColumns.tmplName, Glib::ustring("")); - iter->set_value (templateColumns.rowSeparator, true); - iter = templateModel->append (); - iter->set_value (templateColumns.tmplName, Glib::ustring(M("FILEBROWSER_ADDDELTEMPLATE"))); - iter->set_value (templateColumns.rowSeparator, false); -} +//bool RenameDialog::isTemplSelected () +//{ +// +// Gtk::TreeModel::iterator iter = templates->get_active(); +// return iter && iter->get_value (templateColumns.tmplName) != M("FILEBROWSER_ADDDELTEMPLATE"); +//} -bool RenameDialog::rowSeparatorFunc (const Glib::RefPtr& model, const Gtk::TreeModel::iterator& iter) -{ +//Glib::ustring RenameDialog::getActiveTemplate () +//{ +// +// Gtk::TreeModel::iterator iter = templates->get_active(); +// +// if (iter && iter->get_value (templateColumns.tmplName) != M("FILEBROWSER_ADDDELTEMPLATE")) { +// return iter->get_value (templateColumns.tmplName); +// } else { +// return ""; +// } +//} - return iter->get_value (templateColumns.rowSeparator); -} +//void RenameDialog::tmplSelectionChanged () +//{ +// +// Gtk::TreeModel::iterator iter = templates->get_active(); +// +// if (iter && iter->get_value (templateColumns.tmplName) == M("FILEBROWSER_ADDDELTEMPLATE")) { +// RenameTemplateEditor* rte = new RenameTemplateEditor (p); +// +// if (rte->run() == Gtk::RESPONSE_OK) { +// fillTemplateList (); +// } +// +// delete rte; +// // show add/del template dialog +// } else { +// useTemplToggled (); +// } +//} -void RenameDialog::useTemplToggled () -{ +//RenameTemplateEditor::RenameTemplateEditor (Gtk::Window* parent) +// : Gtk::Dialog ("Edit rename templates", *parent, true, true) +//{ +// +// list = Gtk::manage (new Gtk::ListViewText (1, false, Gtk::SELECTION_MULTIPLE)); +// list->set_headers_visible (false); +// get_vbox ()->pack_start (*list); +// +// Gtk::HBox* hb = Gtk::manage (new Gtk::HBox ()); +// templ = Gtk::manage (new Gtk::Entry ()); +// Gtk::Button* add = Gtk::manage (new Gtk::Button ()); +// Gtk::Button* del = Gtk::manage (new Gtk::Button ()); +// add->add (*Gtk::manage (new RTImage ("list-add-small.png"))); +// del->add (*Gtk::manage (new RTImage ("list-remove-red-small.png"))); +// hb->pack_start (*templ); +// hb->pack_start (*add, Gtk::PACK_SHRINK, 2); +// hb->pack_start (*del, Gtk::PACK_SHRINK, 2); +// +// get_vbox ()->pack_start (*hb, Gtk::PACK_SHRINK, 4); +// +// add_button (Gtk::Stock::OK, Gtk::RESPONSE_OK); +// +// refreshTemplateList (); +// +// add->signal_pressed().connect( sigc::mem_fun(*this, &RenameTemplateEditor::addPressed) ); +// del->signal_pressed().connect( sigc::mem_fun(*this, &RenameTemplateEditor::delPressed) ); +// +// show_all_children (); +// +// set_size_request (-1, 250); +//} +// +//void RenameTemplateEditor::refreshTemplateList () +//{ +// +// list->clear_items (); +// +// for (size_t i = 0; i < options.renameTemplates.size(); i++) { +// list->append_text (options.renameTemplates[i]); +// } +//} +// +//void RenameTemplateEditor::addPressed () +//{ +// +// if (templ->get_text() != "") { +// options.renameTemplates.push_back (templ->get_text ()); +// refreshTemplateList (); +// templ->set_text(""); +// } +//} +// +//void RenameTemplateEditor::delPressed () +//{ +// +// std::vector sel = list->get_selected (); +// +// for (size_t i = 0; i < sel.size(); i++) { +// Glib::ustring toDel = list->get_text (sel[i]); +// std::vector::iterator f = std::find (options.renameTemplates.begin(), options.renameTemplates.end(), toDel); +// +// if (f != options.renameTemplates.end()) { +// options.renameTemplates.erase (f); +// } +// } +// +// refreshTemplateList (); +//} - templates->set_sensitive (useTmpl->get_active ()); - - if (useTmpl->get_active () && isTemplSelected ()) { - all->set_sensitive (true); - newName->set_text (applyTemplate (oldName->get_text(), imageData, getActiveTemplate())); - } else { - all->set_sensitive (false); - } - - newName->select_region (0, newName->get_text().size()); -} - -bool RenameDialog::isTemplSelected () -{ - - Gtk::TreeModel::iterator iter = templates->get_active(); - return iter && iter->get_value (templateColumns.tmplName) != M("FILEBROWSER_ADDDELTEMPLATE"); -} - -Glib::ustring RenameDialog::getActiveTemplate () -{ - - Gtk::TreeModel::iterator iter = templates->get_active(); - - if (iter && iter->get_value (templateColumns.tmplName) != M("FILEBROWSER_ADDDELTEMPLATE")) { - return iter->get_value (templateColumns.tmplName); - } else { - return ""; - } -} - -void RenameDialog::tmplSelectionChanged () -{ - - Gtk::TreeModel::iterator iter = templates->get_active(); - - if (iter && iter->get_value (templateColumns.tmplName) == M("FILEBROWSER_ADDDELTEMPLATE")) { - RenameTemplateEditor* rte = new RenameTemplateEditor (p); - - if (rte->run() == Gtk::RESPONSE_OK) { - fillTemplateList (); - } - - delete rte; - // show add/del template dialog - } else { - useTemplToggled (); - } -} - -RenameTemplateEditor::RenameTemplateEditor (Gtk::Window* parent) - : Gtk::Dialog ("Edit rename templates", *parent, true, true) -{ - - list = Gtk::manage (new Gtk::ListViewText (1, false, Gtk::SELECTION_MULTIPLE)); - list->set_headers_visible (false); - get_vbox ()->pack_start (*list); - - Gtk::HBox* hb = Gtk::manage (new Gtk::HBox ()); - templ = Gtk::manage (new Gtk::Entry ()); - Gtk::Button* add = Gtk::manage (new Gtk::Button ()); - Gtk::Button* del = Gtk::manage (new Gtk::Button ()); - add->add (*Gtk::manage (new RTImage ("list-add-small.png"))); - del->add (*Gtk::manage (new RTImage ("list-remove-red-small.png"))); - hb->pack_start (*templ); - hb->pack_start (*add, Gtk::PACK_SHRINK, 2); - hb->pack_start (*del, Gtk::PACK_SHRINK, 2); - - get_vbox ()->pack_start (*hb, Gtk::PACK_SHRINK, 4); - - add_button (Gtk::Stock::OK, Gtk::RESPONSE_OK); - - refreshTemplateList (); - - add->signal_pressed().connect( sigc::mem_fun(*this, &RenameTemplateEditor::addPressed) ); - del->signal_pressed().connect( sigc::mem_fun(*this, &RenameTemplateEditor::delPressed) ); - - show_all_children (); - - set_size_request (-1, 250); -} - -void RenameTemplateEditor::refreshTemplateList () -{ - - list->clear_items (); - - for (size_t i = 0; i < options.renameTemplates.size(); i++) { - list->append_text (options.renameTemplates[i]); - } -} - -void RenameTemplateEditor::addPressed () -{ - - if (templ->get_text() != "") { - options.renameTemplates.push_back (templ->get_text ()); - refreshTemplateList (); - templ->set_text(""); - } -} - -void RenameTemplateEditor::delPressed () -{ - - std::vector sel = list->get_selected (); - - for (size_t i = 0; i < sel.size(); i++) { - Glib::ustring toDel = list->get_text (sel[i]); - std::vector::iterator f = std::find (options.renameTemplates.begin(), options.renameTemplates.end(), toDel); - - if (f != options.renameTemplates.end()) { - options.renameTemplates.erase (f); - } - } - - refreshTemplateList (); -} - -Glib::ustring RenameDialog::applyTemplate (const Glib::ustring& oName, const CacheImageData* cid, const Glib::ustring& templ) -{ - - return Glib::ustring ("szeva"); - -} +//Glib::ustring RenameDialog::applyTemplate (const Glib::ustring& oName, const CacheImageData* cid, const Glib::ustring& templ) +//{ +// +// return Glib::ustring ("szeva"); +// +//} diff --git a/rtgui/renamedlg.h b/rtgui/renamedlg.h index a5dec4efa..94972d575 100644 --- a/rtgui/renamedlg.h +++ b/rtgui/renamedlg.h @@ -30,62 +30,62 @@ class RenameDialog : public Gtk::Dialog protected: - class TemplateColumns : public Gtk::TreeModel::ColumnRecord - { - public: - Gtk::TreeModelColumn tmplName; - Gtk::TreeModelColumn rowSeparator; - TemplateColumns() - { - add(tmplName); - add(rowSeparator); - } - }; - TemplateColumns templateColumns; - Glib::RefPtr templateModel; +// class TemplateColumns : public Gtk::TreeModel::ColumnRecord +// { +// public: +// Gtk::TreeModelColumn tmplName; +// Gtk::TreeModelColumn rowSeparator; +// TemplateColumns() +// { +// add(tmplName); +// add(rowSeparator); +// } +// }; +// TemplateColumns templateColumns; +// Glib::RefPtr templateModel; Gtk::Window* p; Gtk::Label* oldName; Gtk::Entry* newName; - Gtk::CheckButton* useTmpl; - MyComboBox* templates; - Gtk::Button* all; +// Gtk::CheckButton* useTmpl; +// MyComboBox* templates; +// Gtk::Button* all; const CacheImageData* imageData; - void fillTemplateList (); +// void fillTemplateList (); public: - RenameDialog (Gtk::Window* parent); + explicit RenameDialog (Gtk::Window* parent); void initName (const Glib::ustring& iname, const CacheImageData* cid); Glib::ustring getNewName (); - bool rowSeparatorFunc (const Glib::RefPtr& model, const Gtk::TreeModel::iterator& iter); - void tmplSelectionChanged (); - void useTemplToggled (); +// bool rowSeparatorFunc (const Glib::RefPtr& model, const Gtk::TreeModel::iterator& iter); +// void tmplSelectionChanged (); +// void useTemplToggled (); - bool isTemplSelected (); - Glib::ustring getActiveTemplate (); +// bool isTemplSelected (); +// Glib::ustring getActiveTemplate (); - static Glib::ustring applyTemplate (const Glib::ustring& oName, const CacheImageData* cid, const Glib::ustring& templ); +// static Glib::ustring applyTemplate (const Glib::ustring& oName, const CacheImageData* cid, const Glib::ustring& templ); }; -class RenameTemplateEditor : public Gtk::Dialog -{ - -protected: - Gtk::ListViewText* list; - Gtk::Entry* templ; - - void refreshTemplateList (); -public: - RenameTemplateEditor (Gtk::Window* parent); - - Glib::ustring getSelectedTemplate (); - - void addPressed (); - void delPressed (); -}; +//class RenameTemplateEditor : public Gtk::Dialog +//{ +// +//protected: +// Gtk::ListViewText* list; +// Gtk::Entry* templ; +// +// void refreshTemplateList (); +//public: +// explicit RenameTemplateEditor (Gtk::Window* parent); +// +// Glib::ustring getSelectedTemplate (); +// +// void addPressed (); +// void delPressed (); +//}; #endif diff --git a/rtgui/resize.cc b/rtgui/resize.cc index 231f84659..64cf673e9 100644 --- a/rtgui/resize.cc +++ b/rtgui/resize.cc @@ -29,7 +29,7 @@ Resize::Resize () : FoldableToolPanel(this, "resize", M("TP_RESIZE_LABEL"), fals croph = 0; Gtk::Table* combos = Gtk::manage (new Gtk::Table (2, 2)); - Gtk::Label *label = NULL; + Gtk::Label *label = nullptr; appliesTo = Gtk::manage (new MyComboBoxText ()); appliesTo->append_text (M("TP_RESIZE_CROPPEDAREA")); diff --git a/rtgui/resize.h b/rtgui/resize.h index 19ddc5843..cf640c281 100644 --- a/rtgui/resize.h +++ b/rtgui/resize.h @@ -52,9 +52,9 @@ public: return packBox; } - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/retinex.cc b/rtgui/retinex.cc index fead40b88..61d9073ae 100644 --- a/rtgui/retinex.cc +++ b/rtgui/retinex.cc @@ -105,7 +105,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), std::vector defaultCurve; rtengine::RetinexParams::getDefaulttransmissionCurve(defaultCurve); - transmissionShape = static_cast(transmissionCurveEditorG->addCurve(CT_Flat, "", NULL, false)); + transmissionShape = static_cast(transmissionCurveEditorG->addCurve(CT_Flat, "", nullptr, false, false)); transmissionShape->setIdentityValue(0.); transmissionShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); transmissionShape->setBottomBarBgGradient(milestones); @@ -184,7 +184,7 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), // std::vector defaultCurve; rtengine::RetinexParams::getDefaultgaintransmissionCurve(defaultCurve); - gaintransmissionShape = static_cast(gaintransmissionCurve->addCurve(CT_Flat, "", NULL, false)); + gaintransmissionShape = static_cast(gaintransmissionCurve->addCurve(CT_Flat, "", nullptr, false, false)); gaintransmissionShape->setIdentityValue(0.); gaintransmissionShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); gaintransmissionShape->setBottomBarBgGradient(milestones); @@ -1121,7 +1121,7 @@ void Retinex::gammaretinexChanged() if(gammaretinex->get_active_row_number() == 4) { gam->show(); slope->show(); - } else if(gammaretinex->get_active_row_number() != 4) { + } else /*if(gammaretinex->get_active_row_number() != 4)*/ { gam->hide(); slope->hide(); } diff --git a/rtgui/retinex.h b/rtgui/retinex.h index 064756a7b..65602863a 100644 --- a/rtgui/retinex.h +++ b/rtgui/retinex.h @@ -99,10 +99,10 @@ public: Retinex (); ~Retinex (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void trimValues (rtengine::procparams::ProcParams* pp); void adjusterChanged (Adjuster* a, double newval); void autoOpenCurve (); diff --git a/rtgui/rgbcurves.h b/rtgui/rgbcurves.h index c471a2063..efca76422 100644 --- a/rtgui/rgbcurves.h +++ b/rtgui/rgbcurves.h @@ -44,8 +44,8 @@ public: RGBCurves (); ~RGBCurves (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void setEditProvider (EditDataProvider *provider); void autoOpenCurve (); diff --git a/rtgui/rotate.cc b/rtgui/rotate.cc index e688dba62..d41362132 100644 --- a/rtgui/rotate.cc +++ b/rtgui/rotate.cc @@ -27,7 +27,7 @@ using namespace rtengine::procparams; Rotate::Rotate () : FoldableToolPanel(this, "rotate", M("TP_ROTATE_LABEL")) { - rlistener = NULL; + rlistener = nullptr; //TODO the action of the rotation slider is counter-intuitive Gtk::Image* irotateL = Gtk::manage (new RTImage ("rotate-right-2.png")); diff --git a/rtgui/rotate.h b/rtgui/rotate.h index a67f310d5..bad46ef84 100644 --- a/rtgui/rotate.h +++ b/rtgui/rotate.h @@ -36,9 +36,9 @@ public: Rotate (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void straighten (double deg); diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index e64c64d8e..de5bbee43 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -79,12 +79,12 @@ osx_open_file_cb (GtkosxApplication *app, gchar *path_, gpointer data) #endif // __APPLE__ RTWindow::RTWindow () - : mainNB(NULL) - , bpanel(NULL) - , splash(NULL) - , btn_fullscreen(NULL) - , epanel(NULL) - , fpanel(NULL) + : mainNB(nullptr) + , bpanel(nullptr) + , splash(nullptr) + , btn_fullscreen(nullptr) + , epanel(nullptr) + , fpanel(nullptr) { cacheMgr->init (); @@ -143,19 +143,19 @@ RTWindow::RTWindow () signal_key_press_event().connect( sigc::mem_fun(*this, &RTWindow::keyPressed) ); if(simpleEditor) { - epanel = Gtk::manage( new EditorPanel (NULL) ); + epanel = Gtk::manage( new EditorPanel (nullptr) ); epanel->setParent (this); add (*epanel); show_all (); - pldBridge = NULL; // No progress listener + pldBridge = nullptr; // No progress listener CacheManager* cm = CacheManager::getInstance(); Thumbnail* thm = cm->getEntry( argv1 ); if(thm) { int error; - rtengine::InitialImage *ii = rtengine::InitialImage::load(argv1, thm->getType() == FT_Raw, &error, NULL); + rtengine::InitialImage *ii = rtengine::InitialImage::load(argv1, thm->getType() == FT_Raw, &error, nullptr); epanel->open( thm, ii ); } } else { @@ -299,7 +299,7 @@ RTWindow::~RTWindow() delete pldBridge; } - pldBridge = NULL; + pldBridge = nullptr; #if defined(__APPLE__) g_object_unref (osxApp); #endif @@ -379,7 +379,7 @@ void RTWindow::on_realize () splash->show (); } else { delete splash; - splash = NULL; + splash = nullptr; } } } @@ -552,7 +552,7 @@ bool RTWindow::keyPressed (GdkEventKey* event) #endif if (try_quit) { - if (!on_delete_event(0)) { + if (!on_delete_event(nullptr)) { gtk_main_quit(); } } @@ -690,8 +690,7 @@ bool RTWindow::on_delete_event(GdkEventAny* event) ProfilePanel::cleanup(); if (!options.windowMaximized) { - options.windowWidth = get_width(); - options.windowHeight = get_height(); + get_size(options.windowWidth, options.windowHeight); get_position (options.windowX, options.windowY); } @@ -844,7 +843,7 @@ void RTWindow::updateHistogramPosition (int oldPosition, int newPosition) bool RTWindow::splashClosed(GdkEventAny* event) { delete splash; - splash = NULL; + splash = nullptr; return true; } diff --git a/rtgui/saveasdlg.cc b/rtgui/saveasdlg.cc index c9490f585..2afd1eb58 100644 --- a/rtgui/saveasdlg.cc +++ b/rtgui/saveasdlg.cc @@ -22,7 +22,7 @@ #include "rtimage.h" extern Options options; -SaveAsDialog::SaveAsDialog (Glib::ustring initialDir) +SaveAsDialog::SaveAsDialog (const Glib::ustring &initialDir) { set_title(M("GENERAL_SAVE")); diff --git a/rtgui/saveasdlg.h b/rtgui/saveasdlg.h index 4727b574c..4810b46d9 100644 --- a/rtgui/saveasdlg.h +++ b/rtgui/saveasdlg.h @@ -45,7 +45,7 @@ protected: void putToQueueClicked (); public: - SaveAsDialog (Glib::ustring initialDir); + explicit SaveAsDialog (const Glib::ustring &initialDir); Glib::ustring getFileName (); Glib::ustring getDirectory (); diff --git a/rtgui/saveformatpanel.cc b/rtgui/saveformatpanel.cc index 2159f6623..2afd5703b 100644 --- a/rtgui/saveformatpanel.cc +++ b/rtgui/saveformatpanel.cc @@ -20,7 +20,7 @@ #include "multilangmgr.h" #include "guiutils.h" -SaveFormatPanel::SaveFormatPanel () : listener (NULL) +SaveFormatPanel::SaveFormatPanel () : listener (nullptr) { jpegqual = new Adjuster (M("SAVEDLG_JPEGQUAL"), 0, 100, 1, 100); @@ -96,7 +96,7 @@ void SaveFormatPanel::init (SaveFormat &sf) { FormatChangeListener* tmp = listener; - listener = NULL; + listener = nullptr; if (sf.format == "jpg") { format->set_active (0); diff --git a/rtgui/shadowshighlights.h b/rtgui/shadowshighlights.h index 60071e58f..167b1ecf1 100644 --- a/rtgui/shadowshighlights.h +++ b/rtgui/shadowshighlights.h @@ -41,9 +41,9 @@ public: ShadowsHighlights (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/sharpenedge.h b/rtgui/sharpenedge.h index 5c8730038..f27d4ecee 100644 --- a/rtgui/sharpenedge.h +++ b/rtgui/sharpenedge.h @@ -44,9 +44,9 @@ public: SharpenEdge (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void trimValues (rtengine::procparams::ProcParams* pp); void setAdjusterBehavior (bool amountadd, bool passadd); diff --git a/rtgui/sharpening.cc b/rtgui/sharpening.cc index 6af30c68b..b83b2c6d9 100644 --- a/rtgui/sharpening.cc +++ b/rtgui/sharpening.cc @@ -25,8 +25,6 @@ using namespace rtengine::procparams; Sharpening::Sharpening () : FoldableToolPanel(this, "sharpening", M("TP_SHARPENING_LABEL"), true, true) { - setEnabledTooltipMarkup(M("TP_SHARPENING_TOOLTIP")); - Gtk::HBox* hb = Gtk::manage (new Gtk::HBox ()); hb->set_border_width (4); hb->show (); diff --git a/rtgui/sharpening.h b/rtgui/sharpening.h index 3020cea7f..45c2d9fe1 100644 --- a/rtgui/sharpening.h +++ b/rtgui/sharpening.h @@ -58,9 +58,9 @@ public: Sharpening (); virtual ~Sharpening (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/sharpenmicro.cc b/rtgui/sharpenmicro.cc index 2ca0ddf44..62e982436 100644 --- a/rtgui/sharpenmicro.cc +++ b/rtgui/sharpenmicro.cc @@ -28,8 +28,6 @@ using namespace rtengine::procparams; SharpenMicro::SharpenMicro () : FoldableToolPanel(this, "sharpenmicro", M("TP_SHARPENMICRO_LABEL"), true, true) { - setEnabledTooltipMarkup(M("TP_SHARPENING_TOOLTIP")); - amount = Gtk::manage(new Adjuster (M("TP_SHARPENMICRO_AMOUNT"), 0, 100, 1, 20)); amount->setAdjusterListener (this); diff --git a/rtgui/sharpenmicro.h b/rtgui/sharpenmicro.h index 4b45dd5c4..03a75eaa5 100644 --- a/rtgui/sharpenmicro.h +++ b/rtgui/sharpenmicro.h @@ -44,9 +44,9 @@ public: SharpenMicro (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void trimValues (rtengine::procparams::ProcParams* pp); void setAdjusterBehavior (bool amountadd, bool uniformityadd ); diff --git a/rtgui/shcselector.cc b/rtgui/shcselector.cc index 461eb118f..1a5a7be4d 100644 --- a/rtgui/shcselector.cc +++ b/rtgui/shcselector.cc @@ -21,7 +21,7 @@ #include "multilangmgr.h" #include "mycurve.h" -SHCSelector::SHCSelector() : ColoredBar(RTO_Left2Right), movingPosition(-1), cl(NULL) +SHCSelector::SHCSelector() : ColoredBar(RTO_Left2Right), movingPosition(-1), tmpX(0.0), tmpPos(0.0), wslider(0.0), cl(nullptr) { positions[0] = defaults[0] = 0.25; diff --git a/rtgui/splash.cc b/rtgui/splash.cc index c936639f7..87408598e 100644 --- a/rtgui/splash.cc +++ b/rtgui/splash.cc @@ -87,7 +87,7 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t set_border_width (4); - releaseNotesSW = NULL; + releaseNotesSW = nullptr; nb = Gtk::manage (new Gtk::Notebook ()); get_vbox()->pack_start (*nb); @@ -110,7 +110,7 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t if ( Glib::file_test(buildFileName, (Glib::FILE_TEST_EXISTS)) ) { FILE *f = g_fopen (buildFileName.c_str (), "rt"); - if (f != NULL) { + if (f != nullptr) { char* buffer = new char[1024]; std::ostringstream ostr; @@ -140,7 +140,7 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t if ( Glib::file_test(creditsFileName, (Glib::FILE_TEST_EXISTS)) ) { FILE *f = g_fopen (creditsFileName.c_str (), "rt"); - if (f != NULL) { + if (f != nullptr) { char* buffer = new char[1024]; std::ostringstream ostr; @@ -171,7 +171,7 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t if ( Glib::file_test(licenseFileName, (Glib::FILE_TEST_EXISTS)) ) { FILE *f = g_fopen (licenseFileName.c_str (), "rt"); - if (f != NULL) { + if (f != nullptr) { char* buffer = new char[1024]; std::ostringstream ostr; @@ -208,7 +208,7 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t if ( Glib::file_test(releaseNotesFileName, (Glib::FILE_TEST_EXISTS)) ) { FILE *f = g_fopen (releaseNotesFileName.c_str (), "rt"); - if (f != NULL) { + if (f != nullptr) { char* buffer = new char[1024]; std::ostringstream ostr; diff --git a/rtgui/splash.h b/rtgui/splash.h index 5e3d5e1b4..707d0b86d 100644 --- a/rtgui/splash.h +++ b/rtgui/splash.h @@ -46,11 +46,11 @@ private: public: Splash (Gtk::Window& parent, int maxtime); - Splash (Gtk::Window& parent); + explicit Splash (Gtk::Window& parent); bool hasReleaseNotes() { - return releaseNotesSW != NULL; + return releaseNotesSW != nullptr; }; void showReleaseNotes(); bool on_timer (); diff --git a/rtgui/spot.cc b/rtgui/spot.cc index 0d1b1d596..949f592ee 100644 --- a/rtgui/spot.cc +++ b/rtgui/spot.cc @@ -577,7 +577,7 @@ bool Spot::drag1 (const int modifierKey) //printf("sourceCircle / deltaPrevImage = %d / %d\n", editProvider->deltaImage.x, editProvider->deltaImage.y); int lastRadius = spots.at (activeSpot).radius; rtengine::Coord currPos = editProvider->posImage + editProvider->deltaImage; - rtengine::PolarCoord currPolar = currPos - spots.at (activeSpot).sourcePos; + rtengine::PolarCoord currPolar (currPos - spots.at (activeSpot).sourcePos); spots.at (activeSpot).radius = LIM (int (currPolar.radius), SpotParams::minRadius, SpotParams::maxRadius); if (spots.at (activeSpot).radius != lastRadius) { @@ -587,7 +587,7 @@ bool Spot::drag1 (const int modifierKey) //printf("targetCircle / deltaPrevImage = %d / %d\n", editProvider->deltaImage.x, editProvider->deltaImage.y); int lastRadius = spots.at (activeSpot).radius; rtengine::Coord currPos = editProvider->posImage + editProvider->deltaImage; - rtengine::PolarCoord currPolar = currPos - spots.at (activeSpot).targetPos; + rtengine::PolarCoord currPolar (currPos - spots.at (activeSpot).targetPos); spots.at (activeSpot).radius = LIM (int (currPolar.radius), SpotParams::minRadius, SpotParams::maxRadius); if (spots.at (activeSpot).radius != lastRadius) { @@ -597,7 +597,7 @@ bool Spot::drag1 (const int modifierKey) //printf("sourceFeatherCircle / deltaPrevImage = %d / %d\n", editProvider->deltaImage.x, editProvider->deltaImage.y); float currFeather = spots.at (activeSpot).feather; rtengine::Coord currPos = editProvider->posImage + editProvider->deltaImage; - rtengine::PolarCoord currPolar = currPos -spots.at (activeSpot).sourcePos; + rtengine::PolarCoord currPolar (currPos -spots.at (activeSpot).sourcePos); spots.at (activeSpot).feather = LIM01 ((currPolar.radius - double (spots.at (activeSpot).radius)) / double (spots.at (activeSpot).radius)); if (spots.at (activeSpot).feather != currFeather) { @@ -607,7 +607,7 @@ bool Spot::drag1 (const int modifierKey) //printf("targetFeatherCircle / deltaPrevImage = %d / %d\n", editProvider->deltaImage.x, editProvider->deltaImage.y); float currFeather = spots.at (activeSpot).feather; rtengine::Coord currPos = editProvider->posImage + editProvider->deltaImage; - rtengine::PolarCoord currPolar = currPos - spots.at (activeSpot).targetPos; + rtengine::PolarCoord currPolar (currPos - spots.at (activeSpot).targetPos); spots.at (activeSpot).feather = LIM01 ((currPolar.radius - double (spots.at (activeSpot).radius)) / double (spots.at (activeSpot).radius)); if (spots.at (activeSpot).feather != currFeather) { diff --git a/rtgui/threadutils.h b/rtgui/threadutils.h index 03203db82..1215d53a1 100644 --- a/rtgui/threadutils.h +++ b/rtgui/threadutils.h @@ -27,6 +27,8 @@ #include +#include "../rtengine/noncopyable.h" + #if STRICT_MUTEX && NDEBUG using MyMutexBase = Glib::Threads::Mutex; #else @@ -41,15 +43,13 @@ using MyMutexBase = Glib::Threads::RecMutex; * It will behave like Glib::Threads::RecMutex (STRICT_MUTEX=0) or Glib::Threads::Mutex (STRICT_MUTEX=1). * Debug builds with strict mutexes, will emit a message and crash immediately upon recursive locking. */ -class MyMutex : private MyMutexBase +class MyMutex : + public rtengine::NonCopyable, + private MyMutexBase { public: class MyLock; - MyMutex () = default; - MyMutex (const MyMutex&) = delete; - MyMutex& operator= (const MyMutex&) = delete; - void lock (); bool trylock (); void unlock (); @@ -62,7 +62,8 @@ private: #endif }; -class MyMutex::MyLock +class MyMutex::MyLock : + public rtengine::NonCopyable { public: explicit MyLock (MyMutex& mutex); @@ -71,9 +72,6 @@ public: ~MyLock (); - MyLock (const MyLock&) = delete; - MyLock& operator= (const MyLock&) = delete; - void acquire (); bool try_acquire (); void release (); @@ -86,13 +84,10 @@ private: /** * @brief Custom implementation to replace Glib::Threads::RWLock */ -class MyRWMutex +class MyRWMutex : + public rtengine::NonCopyable { public: - MyRWMutex () = default; - MyRWMutex (const MyRWMutex&) = delete; - MyRWMutex& operator= (const MyRWMutex&) = delete; - friend class MyReaderLock; friend class MyWriterLock; @@ -113,14 +108,12 @@ private: /** * @brief Custom implementation to replace Glib::Threads::RWLock::ReaderLock */ -class MyReaderLock +class MyReaderLock : + public rtengine::NonCopyable { public: ~MyReaderLock (); - MyReaderLock (const MyReaderLock&) = delete; - MyReaderLock& operator= (const MyReaderLock&) = delete; - #if !TRACE_MYRWMUTEX explicit MyReaderLock (MyRWMutex& mutex); @@ -141,14 +134,12 @@ private: /** * @brief Custom implementation to replace Glib::Threads::RWLock::WriterLock */ -class MyWriterLock +class MyWriterLock : + public rtengine::NonCopyable { public: ~MyWriterLock (); - MyWriterLock (const MyWriterLock&) = delete; - MyWriterLock& operator= (const MyWriterLock&) = delete; - #if !TRACE_MYRWMUTEX explicit MyWriterLock (MyRWMutex& mutex); diff --git a/rtgui/thresholdadjuster.cc b/rtgui/thresholdadjuster.cc index 800f6edf5..564507bd3 100644 --- a/rtgui/thresholdadjuster.cc +++ b/rtgui/thresholdadjuster.cc @@ -71,7 +71,7 @@ ThresholdAdjuster::ThresholdAdjuster (Glib::ustring label, double minValue, doub void ThresholdAdjuster::initObject (Glib::ustring label, bool editedcb) { - adjusterListener = NULL; + adjusterListener = nullptr; afterReset = false; blocked = false; @@ -90,7 +90,7 @@ void ThresholdAdjuster::initObject (Glib::ustring label, bool editedcb) editedChange = editedCheckBox->signal_toggled().connect( sigc::mem_fun(*this, &ThresholdAdjuster::editedToggled) ); hbox->pack_start (*editedCheckBox); } else { - editedCheckBox = NULL; + editedCheckBox = nullptr; } hbox->pack_start (*this->label); @@ -121,7 +121,7 @@ ThresholdAdjuster::~ThresholdAdjuster () selectorChange.disconnect(); delayConnection.block(true); - adjusterListener = NULL; + adjusterListener = nullptr; } void ThresholdAdjuster::setDefault (double bottom, double top) @@ -163,7 +163,7 @@ void ThresholdAdjuster::resetPressed (GdkEventButton* event) afterReset = true; - if ((event != NULL) && (event->state & GDK_CONTROL_MASK) && (event->button == 1)) + if ((event != nullptr) && (event->state & GDK_CONTROL_MASK) && (event->button == 1)) // CTRL pressed : resetting to current default value { tSelector.reset(); @@ -260,7 +260,7 @@ void ThresholdAdjuster::getValue (Glib::ustring& bottomLeft, Glib::ustring& topL bool ThresholdAdjuster::notifyListener () { - if (adjusterListener != NULL && !blocked) { + if (adjusterListener != nullptr && !blocked) { GThreadLock lock; sendToListener(); } diff --git a/rtgui/thresholdselector.cc b/rtgui/thresholdselector.cc index 796f958e6..59320dd2a 100644 --- a/rtgui/thresholdselector.cc +++ b/rtgui/thresholdselector.cc @@ -17,9 +17,11 @@ * along with RawTherapee. If not, see . */ +#include +#include + #include "thresholdselector.h" #include "multilangmgr.h" -#include #include "mycurve.h" ThresholdSelector::ThresholdSelector(double minValueBottom, double maxValueBottom, double defBottom, Glib::ustring labelBottom, unsigned int precisionBottom, @@ -79,7 +81,7 @@ ThresholdSelector::ThresholdSelector(double minValue, double maxValue, double de assert(minValue < maxValue); #endif - bgCurveProvider = NULL; + bgCurveProvider = nullptr; separatedSliders = false; initalEq1 = startAtOne; minValTop = minValBottom = minValue; @@ -123,7 +125,7 @@ ThresholdSelector::ThresholdSelector(double minValue, double maxValue, double de assert(minValue < maxValue); #endif - bgCurveProvider = NULL; + bgCurveProvider = nullptr; separatedSliders = false; initalEq1 = startAtOne; minValTop = minValBottom = minValue; @@ -551,7 +553,7 @@ void ThresholdSelector::findLitCursor(int posX, int posY) // we use minValTop since if this block is executed, it means that we are in a simple Threshold where both bottom and top range are the same double cursorX = (posX - hb) * (maxValTop - minValTop) / (w - 2 * hb) + minValTop; - if (cursorX > positions[TS_TOPRIGHT] || abs(cursorX - positions[TS_TOPRIGHT]) < abs(cursorX - positions[TS_TOPLEFT])) { + if (cursorX > positions[TS_TOPRIGHT] || std::fabs(cursorX - positions[TS_TOPRIGHT]) < std::fabs(cursorX - positions[TS_TOPLEFT])) { litCursor = TS_TOPRIGHT; } } @@ -564,7 +566,7 @@ void ThresholdSelector::findLitCursor(int posX, int posY) // we use minValTop since if this block is executed, it means that we are in a simple Threshold where both bottom and top range are the same double cursorX = (posX - hb) * (maxValTop - minValTop) / (w - 2 * hb) + minValTop; - if (cursorX > positions[TS_BOTTOMRIGHT] || abs(cursorX - positions[TS_BOTTOMRIGHT]) < abs(cursorX - positions[TS_BOTTOMLEFT])) { + if (cursorX > positions[TS_BOTTOMRIGHT] || std::fabs(cursorX - positions[TS_BOTTOMRIGHT]) < std::fabs(cursorX - positions[TS_BOTTOMLEFT])) { litCursor = TS_BOTTOMRIGHT; } } diff --git a/rtgui/thumbbrowserbase.cc b/rtgui/thumbbrowserbase.cc index ea2bb00dd..8a067ca49 100644 --- a/rtgui/thumbbrowserbase.cc +++ b/rtgui/thumbbrowserbase.cc @@ -25,7 +25,7 @@ using namespace std; ThumbBrowserBase::ThumbBrowserBase () - : lastClicked(NULL), previewHeight(options.thumbSize), numOfCols(1), inspector(NULL), isInspectorActive(false), location(THLOC_FILEBROWSER) + : lastClicked(nullptr), previewHeight(options.thumbSize), numOfCols(1), inspector(nullptr), isInspectorActive(false), location(THLOC_FILEBROWSER) { inW = -1; inH = -1; @@ -559,7 +559,6 @@ void ThumbBrowserBase::arrangeFiles () int ct = 0; int currx = 0; - int curry = 0; while (ct < N) { // find widest item in the column @@ -571,7 +570,7 @@ void ThumbBrowserBase::arrangeFiles () } // arrange items in the column - curry = 0; + int curry = 0; for (int i = 0; ct < N && i < numOfRows; i++, ct++) { while (ct < N && fd[ct]->filtered) { @@ -641,12 +640,11 @@ void ThumbBrowserBase::arrangeFiles () // arrange files int ct = 0; - int currx = 0; int curry = 0; while (ct < N) { // arrange items in the row - currx = 0; + int currx = 0; for (int i = 0; ct < N && i < numOfCols; i++, ct++) { while (ct < N && fd[ct]->filtered) { @@ -730,7 +728,7 @@ void ThumbBrowserBase::on_style_changed (const Glib::RefPtr& style) refreshThumbImages (); } -ThumbBrowserBase::Internal::Internal () : ofsX(0), ofsY(0), parent(NULL), dirty(true) +ThumbBrowserBase::Internal::Internal () : ofsX(0), ofsY(0), parent(nullptr), dirty(true) { } @@ -776,7 +774,7 @@ void ThumbBrowserBase::buttonPressed (int x, int y, int button, GdkEventType typ { // GUI already acquired - ThumbBrowserEntryBase* fileDescr = NULL; + ThumbBrowserEntryBase* fileDescr = nullptr; bool handled = false; { diff --git a/rtgui/thumbbrowserentry.cc b/rtgui/thumbbrowserentry.cc deleted file mode 100644 index 1c491a641..000000000 --- a/rtgui/thumbbrowserentry.cc +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * Copyright (c) 2004-2010 Gabor Horvath - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RawTherapee. If not, see . - */ -#include - -FileBrowserEntry::FileBrowserEntry (Thumbnail* thm, const Glib::ustring& fname) - : ThumbBrowserEntryBase (fname), thumbnail(thm) -{ - - previewOwner = false; - italicstyle = thumbnail->getType() != FT_Raw; - datetimeline = thumbnail->getDateTimeString (); - exifline = thumbnail->getExifString (); -} - -void ThumbBrowserEntry::obtainThumbnailSize () -{ - - if (thumbnail) { - thumbnail->getThumbnailSize (prew, preh); - } -} -Glib::RefPtr ThumbBrowserEntry::editedIcon; -Glib::RefPtr ThumbBrowserEntry::recentlySavedIcon; -Glib::RefPtr ThumbBrowserEntry::enqueuedIcon; -std::vector > ThumbBrowserEntry::getIconsOnImageArea () -{ - - std::vector > ret; - - if (!thumbnail) { - return ret; - } - - if (thumbnail->hasProcParams() && editedIcon) { - ret.push_back (editedIcon); - } - - if (thumbnail->isRecentlySaved() && recentlySavedIcon) { - ret.push_back (recentlySavedIcon); - } - - if (thumbnail->isEnqueued () && enqueuedIcon) { - ret.push_back (enqueuedIcon); - } - - return ret; -} - -ThumbnailButtonSet* ThumbBrowserEntry::getThumbButtonSet () -{ - - return (ThumbnailButtonSet*)buttonSet; -} diff --git a/rtgui/thumbbrowserentrybase.cc b/rtgui/thumbbrowserentrybase.cc index b924655c5..fea52f244 100644 --- a/rtgui/thumbbrowserentrybase.cc +++ b/rtgui/thumbbrowserentrybase.cc @@ -24,10 +24,10 @@ ThumbBrowserEntryBase::ThumbBrowserEntryBase (const Glib::ustring& fname) : fnlabw(0), fnlabh(0), dtlabw(0), dtlabh(0), exlabw(0), exlabh(0), prew(0), preh(0), prex(0), prey(0), upperMargin(6), borderWidth(1), textGap(6), sideMargin(8), lowerMargin(8), - preview(NULL), dispname(Glib::path_get_basename (fname)), buttonSet(NULL), width(0), height(0), + preview(nullptr), dispname(Glib::path_get_basename (fname)), buttonSet(nullptr), width(0), height(0), exp_width(0), exp_height(0), startx(0), starty(0), ofsX(0), ofsY(0), redrawRequests(0), - parent(NULL), original(NULL), bbSelected(false), bbFramed(false), bbPreview(NULL), - thumbnail(NULL), filename(fname), shortname(dispname), exifline(""), datetimeline(""), + parent(nullptr), original(nullptr), bbSelected(false), bbFramed(false), bbPreview(nullptr), + thumbnail(nullptr), filename(fname), shortname(dispname), exifline(""), datetimeline(""), selected(false), drawable(false), filtered(false), framed(false), processing(false), italicstyle(false), edited(false), recentlysaved(false), updatepriority(false), withFilename(WFNAME_NONE) {} @@ -119,7 +119,6 @@ void ThumbBrowserEntryBase::updateBackBuffer () getTextSizes (infow, infoh); int iofs_x = 4, iofs_y = 4; - int igap = 2; int istartx = prex; int istarty = prey; @@ -141,6 +140,7 @@ void ThumbBrowserEntryBase::updateBackBuffer () istarty += iofs_y; if (!bbIcons.empty()) { + int igap = 2; int iwidth = 0; int iheight = 0; @@ -251,7 +251,6 @@ void ThumbBrowserEntryBase::updateBackBuffer () fn->set_width (textw * Pango::SCALE); fn->set_ellipsize (Pango::ELLIPSIZE_MIDDLE); backBuffer->draw_layout (gc_, textposx_ex, textposy + tpos, fn); - tpos += exlabh; } } } @@ -388,7 +387,7 @@ void ThumbBrowserEntryBase::resize (int h) if ( preh != old_preh || width != old_width ) { delete [] preview; - preview = NULL; + preview = nullptr; refreshThumbnailImage (); } else { backBuffer.clear(); // This will force a backBuffer update on queue_draw diff --git a/rtgui/thumbbrowserentrybase.h b/rtgui/thumbbrowserentrybase.h index 1b7f0691a..59b2c022f 100644 --- a/rtgui/thumbbrowserentrybase.h +++ b/rtgui/thumbbrowserentrybase.h @@ -107,7 +107,7 @@ public: bool updatepriority; eWithFilename withFilename; - ThumbBrowserEntryBase (const Glib::ustring& fname); + explicit ThumbBrowserEntryBase (const Glib::ustring& fname); virtual ~ThumbBrowserEntryBase (); void setParent (ThumbBrowserBase* l) diff --git a/rtgui/thumbimageupdater.cc b/rtgui/thumbimageupdater.cc index 5f78e817b..72efd6b43 100644 --- a/rtgui/thumbimageupdater.cc +++ b/rtgui/thumbimageupdater.cc @@ -30,8 +30,8 @@ #define DEBUG(format,args...) //#define DEBUG(format,args...) printf("ThumbImageUpdate::%s: " format "\n", __FUNCTION__, ## args) -class - ThumbImageUpdater::Impl +class ThumbImageUpdater::Impl : + public rtengine::NonCopyable { public: @@ -47,10 +47,10 @@ public: {} Job(): - tbe_(0), - priority_(NULL), + tbe_(nullptr), + priority_(nullptr), upgrade_(false), - listener_(0) + listener_(nullptr) {} ThumbBrowserEntryBase* tbe_; @@ -156,7 +156,7 @@ public: // unlock and do processing; will relock on block exit, then call listener double scale = 1.0; - rtengine::IImage8* img = 0; + rtengine::IImage8* img = nullptr; Thumbnail* thm = j.tbe_->thumbnail; if ( j.upgrade_ ) { @@ -190,7 +190,7 @@ public: }; ThumbImageUpdater* -ThumbImageUpdater::getInstance(void) +ThumbImageUpdater::getInstance() { static ThumbImageUpdater instance_; return &instance_; @@ -205,7 +205,7 @@ void ThumbImageUpdater::add(ThumbBrowserEntryBase* tbe, bool* priority, bool upgrade, ThumbImageUpdateListener* l) { // nobody listening? - if ( l == 0 ) { + if ( l == nullptr ) { return; } @@ -272,7 +272,7 @@ ThumbImageUpdater::removeJobs(ThumbImageUpdateListener* listener) } void -ThumbImageUpdater::removeAllJobs(void) +ThumbImageUpdater::removeAllJobs() { DEBUG("stop"); diff --git a/rtgui/thumbimageupdater.h b/rtgui/thumbimageupdater.h index ea9cff6d7..3b34c9456 100644 --- a/rtgui/thumbimageupdater.h +++ b/rtgui/thumbimageupdater.h @@ -20,14 +20,19 @@ #define _THUMBIMAGEUPDATER_ #include -#include "../rtengine/rtengine.h" -#include "thumbbrowserentrybase.h" #include +#include "../rtengine/rtengine.h" +#include "../rtengine/noncopyable.h" + +#include "thumbbrowserentrybase.h" + class ThumbImageUpdateListener { - public: + virtual ~ThumbImageUpdateListener() + { + } /** * @brief Called when thumbnail image is update @@ -38,14 +43,15 @@ public: * * @note no locks are held when called back */ - virtual void updateImage (rtengine::IImage8* img, double scale, rtengine::procparams::CropParams cropParams) {} + virtual void updateImage(rtengine::IImage8* img, double scale, rtengine::procparams::CropParams cropParams) + { + } }; -class ThumbImageUpdater +class ThumbImageUpdater : + public rtengine::NonCopyable { - public: - /** * @brief Singleton entry point. * diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc index b9d23e46d..71aeab0ab 100644 --- a/rtgui/thumbnail.cc +++ b/rtgui/thumbnail.cc @@ -34,8 +34,8 @@ using namespace rtengine::procparams; Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, CacheImageData* cf) - : fname(fname), cfs(*cf), cachemgr(cm), ref(1), enqueueNumber(0), tpp(NULL), - pparamsValid(false), needsReProcessing(true), imageLoading(false), lastImg(NULL), + : fname(fname), cfs(*cf), cachemgr(cm), ref(1), enqueueNumber(0), tpp(nullptr), + pparamsValid(false), needsReProcessing(true), imageLoading(false), lastImg(nullptr), lastW(0), lastH(0), lastScale(0), initial_(false) { @@ -58,13 +58,13 @@ Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, CacheImageDa } delete tpp; - tpp = 0; + tpp = nullptr; } Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, const std::string& md5) - : fname(fname), cachemgr(cm), ref(1), enqueueNumber(0), tpp(NULL), pparamsValid(false), - needsReProcessing(true), imageLoading(false), lastImg(NULL), - initial_(true) + : fname(fname), cachemgr(cm), ref(1), enqueueNumber(0), tpp(nullptr), pparamsValid(false), + pparamsSet(false), needsReProcessing(true), imageLoading(false), lastImg(nullptr), + lastW(0), lastH(0), lastScale(0.0), initial_(true) { @@ -76,7 +76,7 @@ Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, const std::s initial_ = false; delete tpp; - tpp = 0; + tpp = nullptr; } void Thumbnail::_generateThumbnailImage () @@ -84,9 +84,9 @@ void Thumbnail::_generateThumbnailImage () // delete everything loaded into memory delete tpp; - tpp = NULL; + tpp = nullptr; delete [] lastImg; - lastImg = NULL; + lastImg = nullptr; tw = -1; th = options.maxThumbnailHeight; imgRatio = -1.; @@ -135,7 +135,7 @@ void Thumbnail::_generateThumbnailImage () tpp = rtengine::Thumbnail::loadQuickFromRaw (fname, ri, tw, th, 1, TRUE); } - if ( tpp == NULL ) { + if ( tpp == nullptr ) { quick = false; tpp = rtengine::Thumbnail::loadFromRaw (fname, ri, tw, th, 1, pparams.wb.equal, TRUE); } @@ -210,7 +210,7 @@ rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool retu static int index = 0; // Will act as unique identifier during the session // try to load the last saved parameters from the cache or from the paramfile file - ProcParams* ldprof = NULL; + ProcParams* ldprof = nullptr; Glib::ustring defProf = getType() == FT_Raw ? options.defProfRaw : options.defProfImg; @@ -225,12 +225,12 @@ rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool retu rtengine::RawMetaDataLocation metaData = rtengine::Thumbnail::loadMetaDataFromRaw(fname); imageMetaData = rtengine::ImageMetaData::fromFile (fname, &metaData); } else { - imageMetaData = rtengine::ImageMetaData::fromFile (fname, NULL); + imageMetaData = rtengine::ImageMetaData::fromFile (fname, nullptr); } Glib::ustring tmpFileName( Glib::build_filename(options.cacheBaseDir, Glib::ustring::compose("CPB_temp_%1.txt", index++)) ); - const rtexif::TagDirectory* exifDir = NULL; + const rtexif::TagDirectory* exifDir = nullptr; if (imageMetaData && (exifDir = imageMetaData->getExifData())) { Glib::ustring outFName; @@ -565,15 +565,15 @@ rtengine::IImage8* Thumbnail::processThumbImage (const rtengine::procparams::Pro MyMutex::MyLock lock(mutex); - if ( tpp == 0 ) { + if ( tpp == nullptr ) { _loadThumbnail(); - if ( tpp == 0 ) { - return 0; + if ( tpp == nullptr ) { + return nullptr; } } - rtengine::IImage8* image = 0; + rtengine::IImage8* image = nullptr; if ( cfs.thumbImgType == CacheImageData::QUICK_THUMBNAIL ) { // RAW internal thumbnail, no profile yet: just do some rotation etc. @@ -586,7 +586,7 @@ rtengine::IImage8* Thumbnail::processThumbImage (const rtengine::procparams::Pro tpp->getDimensions(lastW, lastH, lastScale); delete tpp; - tpp = 0; + tpp = nullptr; return image; } @@ -596,20 +596,20 @@ rtengine::IImage8* Thumbnail::upgradeThumbImage (const rtengine::procparams::Pro MyMutex::MyLock lock(mutex); if ( cfs.thumbImgType != CacheImageData::QUICK_THUMBNAIL ) { - return 0; + return nullptr; } _generateThumbnailImage(); - if ( tpp == 0 ) { - return 0; + if ( tpp == nullptr ) { + return nullptr; } rtengine::IImage8* image = tpp->processImage (pparams, h, rtengine::TI_Bilinear, cfs.getCamera(), cfs.focalLen, cfs.focalLen35mm, cfs.focusDist, cfs.shutter, cfs.fnumber, cfs.iso, cfs.expcomp, scale ); tpp->getDimensions(lastW, lastH, lastScale); delete tpp; - tpp = 0; + tpp = nullptr; return image; } @@ -782,12 +782,12 @@ void Thumbnail::_loadThumbnail(bool firstTrial) _loadThumbnail (false); } - if (tpp == NULL) { + if (tpp == nullptr) { return; } } else if (!succ) { delete tpp; - tpp = NULL; + tpp = nullptr; return; } diff --git a/rtgui/thumbnail.h b/rtgui/thumbnail.h index ca2f898ec..a7b889d5f 100644 --- a/rtgui/thumbnail.h +++ b/rtgui/thumbnail.h @@ -71,7 +71,7 @@ class Thumbnail void _loadThumbnail (bool firstTrial = true); void _saveThumbnail (); void _generateThumbnailImage (); - int infoFromImage (const Glib::ustring& fname, rtengine::RawMetaDataLocation* rml = NULL); + int infoFromImage (const Glib::ustring& fname, rtengine::RawMetaDataLocation* rml = nullptr); void loadThumbnail (bool firstTrial = true); void generateExifDateTimeStrings (); @@ -89,7 +89,7 @@ public: // Use this to create params on demand for update ; if flaggingMode=true, the procparams is created for a file being flagged (inTrash, rank, colorLabel) rtengine::procparams::ProcParams* createProcParamsForUpdate (bool returnParams, bool forceCPB, bool flaggingMode = false); - void setProcParams (const rtengine::procparams::ProcParams& pp, ParamsEdited* pe = NULL, int whoChangedIt = -1, bool updateCacheNow = true); + void setProcParams (const rtengine::procparams::ProcParams& pp, ParamsEdited* pe = nullptr, int whoChangedIt = -1, bool updateCacheNow = true); void clearProcParams (int whoClearedIt = -1); void loadProcParams (); @@ -112,7 +112,7 @@ public: // unsigned char* getThumbnailImage (int &w, int &h, int fixwh=1); // fixwh = 0: fix w and calculate h, =1: fix h and calculate w rtengine::IImage8* processThumbImage (const rtengine::procparams::ProcParams& pparams, int h, double& scale); rtengine::IImage8* upgradeThumbImage (const rtengine::procparams::ProcParams& pparams, int h, double& scale); - void getThumbnailSize (int &w, int &h, const rtengine::procparams::ProcParams *pparams = NULL); + void getThumbnailSize (int &w, int &h, const rtengine::procparams::ProcParams *pparams = nullptr); void getFinalSize (const rtengine::procparams::ProcParams& pparams, int& w, int& h); const Glib::ustring& getExifString (); @@ -187,7 +187,7 @@ public: { return pparams.inTrash; } - void setStage (int stage) + void setStage (bool stage) { if (pparams.inTrash != stage) { pparams.inTrash = stage; diff --git a/rtgui/tonecurve.h b/rtgui/tonecurve.h index be94c073a..e2ba03602 100644 --- a/rtgui/tonecurve.h +++ b/rtgui/tonecurve.h @@ -77,9 +77,9 @@ public: ToneCurve (); ~ToneCurve (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void setAdjusterBehavior (bool expadd, bool hlcompadd, bool hlcompthreshadd, bool bradd, bool blackadd, bool shcompadd, bool contradd, bool satadd); void trimValues (rtengine::procparams::ProcParams* pp); diff --git a/rtgui/toolbar.cc b/rtgui/toolbar.cc index 7a7222299..ebedbb306 100644 --- a/rtgui/toolbar.cc +++ b/rtgui/toolbar.cc @@ -1,3 +1,4 @@ + /* * This file is part of RawTherapee. * @@ -20,7 +21,7 @@ #include "multilangmgr.h" #include "guiutils.h" -ToolBar::ToolBar () : listener (NULL) +ToolBar::ToolBar () : showColPickers(true), listener (nullptr) { editingMode = false; @@ -47,6 +48,19 @@ ToolBar::ToolBar () : listener (NULL) pack_start (*wbTool); + showcolpickersimg = Gtk::manage (new RTImage ("colorPickers-show.png")); + showcolpickersimg->reference(); + hidecolpickersimg = Gtk::manage (new RTImage ("colorPickers-hide.png")); + hidecolpickersimg->reference(); + + colPickerTool = Gtk::manage (new Gtk::ToggleButton ()); + colPickerTool->add (*showcolpickersimg); + showcolpickersimg->show (); + colPickerTool->set_relief(Gtk::RELIEF_NONE); + colPickerTool->show (); + + pack_start (*colPickerTool); + cropTool = Gtk::manage (new Gtk::ToggleButton ()); Gtk::Image* cropimg = Gtk::manage (new RTImage ("crop.png")); cropTool->add (*cropimg); @@ -71,11 +85,13 @@ ToolBar::ToolBar () : listener (NULL) handConn = handTool->signal_toggled().connect( sigc::mem_fun(*this, &ToolBar::hand_pressed)); wbConn = wbTool->signal_toggled().connect( sigc::mem_fun(*this, &ToolBar::wb_pressed)); + cpConn = colPickerTool->signal_button_press_event().connect_notify( sigc::mem_fun(*this, &ToolBar::colPicker_pressed)); cropConn = cropTool->signal_toggled().connect( sigc::mem_fun(*this, &ToolBar::crop_pressed)); straConn = straTool->signal_toggled().connect( sigc::mem_fun(*this, &ToolBar::stra_pressed)); handTool->set_tooltip_markup (M("TOOLBAR_TOOLTIP_HAND")); wbTool->set_tooltip_markup (M("TOOLBAR_TOOLTIP_WB")); + colPickerTool->set_tooltip_markup (M("TOOLBAR_TOOLTIP_COLORPICKER")); cropTool->set_tooltip_markup (M("TOOLBAR_TOOLTIP_CROP")); straTool->set_tooltip_markup (M("TOOLBAR_TOOLTIP_STRAIGHTEN")); } @@ -84,6 +100,8 @@ ToolBar::~ToolBar () { handimg->unreference(); editinghandimg->unreference(); + showcolpickersimg->unreference(); + hidecolpickersimg->unreference(); } // @@ -92,16 +110,15 @@ ToolBar::~ToolBar () void ToolBar::setTool (ToolMode tool) { - handConn.block (true); - cropConn.block (true); + bool stopEdit; - if (wbTool) { - wbConn.block (true); - } + { + ConnectionBlocker handBlocker(handConn); + ConnectionBlocker straBlocker(straConn); + ConnectionBlocker cropBlocker(cropConn); + ConnectionBlocker wbWasBlocked(wbTool, wbConn), cpWasBlocked(colPickerTool, cpConn); - straConn.block (true); - - bool stopEdit = tool == TMHand && handTool->get_active() && editingMode; + stopEdit = tool == TMHand && handTool->get_active() && editingMode; handTool->set_active (false); @@ -111,6 +128,9 @@ void ToolBar::setTool (ToolMode tool) cropTool->set_active (false); straTool->set_active (false); + if (colPickerTool) { + colPickerTool->set_active (false); + } if (tool == TMHand) { handTool->set_active (true); @@ -123,19 +143,16 @@ void ToolBar::setTool (ToolMode tool) cropTool->set_active (true); } else if (tool == TMStraighten) { straTool->set_active (true); + } else if (tool == TMColorPicker) { + if (colPickerTool) { + colPickerTool->set_active (true); + } } current = tool; - handConn.block (false); - cropConn.block (false); - - if (wbTool) { - wbConn.block (false); } - straConn.block (false); - if (stopEdit) { stopEditMode(); @@ -148,7 +165,28 @@ void ToolBar::setTool (ToolMode tool) void ToolBar::startEditMode() { if (!editingMode) { - handTool->set_active(true); // will call hand_pressed, with editingMode=false + { + ConnectionBlocker handBlocker(handConn); + ConnectionBlocker straBlocker(straConn); + ConnectionBlocker cropBlocker(cropConn); + ConnectionBlocker wbWasBlocked(wbTool, wbConn), cpWasBlocked(colPickerTool, cpConn); + + if (current != TMHand) { + if (colPickerTool) { + colPickerTool->set_active(false); + } + if (wbTool) { + wbTool->set_active (false); + } + + cropTool->set_active (false); + straTool->set_active (false); + current = TMHand; + } + handTool->set_active (true); + + } + editingMode = true; handTool->set_image(*editinghandimg); } @@ -165,30 +203,28 @@ void ToolBar::stopEditMode() { if (editingMode) { editingMode = false; - /* WARNING: Should we toggle the Hand button on? - * This method can be called while another tool is active, e.g. if the user toggle off - * the Subscriber's Edit button. For now, we keep that other tool active. If one want to - * switch to the Hand tool, uncommenting the following line should suffice (not tested). - * - * handTool->set_active(true); - */ handTool->set_image(*handimg); } } void ToolBar::hand_pressed () { + { + ConnectionBlocker handBlocker(handConn); + ConnectionBlocker straBlocker(straConn); + ConnectionBlocker cropBlocker(cropConn); + ConnectionBlocker wbWasBlocked(wbTool, wbConn), cpWasBlocked(colPickerTool, cpConn); - handConn.block (true); - cropConn.block (true); - - if (wbTool) { - wbConn.block (true); + if (editingMode) { + stopEditMode(); + if (listener) { + listener->editModeSwitchedOff (); + } } - - straConn.block (true); - if (current != TMHand) { + if (colPickerTool) { + colPickerTool->set_active(false); + } if (wbTool) { wbTool->set_active (false); } @@ -196,26 +232,12 @@ void ToolBar::hand_pressed () cropTool->set_active (false); straTool->set_active (false); current = TMHand; - } else { - if (editingMode) { - stopEditMode(); - } - - if (listener) { - listener->editModeSwitchedOff (); - } } handTool->set_active (true); - handConn.block (false); - cropConn.block (false); - if (wbTool) { - wbConn.block (false); } - straConn.block (false); - if (listener) { listener->toolSelected (TMHand); } @@ -223,20 +245,25 @@ void ToolBar::hand_pressed () void ToolBar::wb_pressed () { - - handConn.block (true); - cropConn.block (true); - - if (wbTool) { - wbConn.block (true); - } - - straConn.block (true); + { + ConnectionBlocker handBlocker(handConn); + ConnectionBlocker straBlocker(straConn); + ConnectionBlocker cropBlocker(cropConn); + ConnectionBlocker wbWasBlocked(wbTool, wbConn), cpWasBlocked(colPickerTool, cpConn); if (current != TMSpotWB) { + if (editingMode) { + stopEditMode(); + if (listener) { + listener->editModeSwitchedOff (); + } + } handTool->set_active (false); cropTool->set_active (false); straTool->set_active (false); + if (colPickerTool) { + colPickerTool->set_active(false); + } current = TMSpotWB; } @@ -244,35 +271,112 @@ void ToolBar::wb_pressed () wbTool->set_active (true); } - handConn.block (false); - cropConn.block (false); - - if (wbTool) { - wbConn.block (false); } - straConn.block (false); - if (listener) { listener->toolSelected (TMSpotWB); } } -void ToolBar::crop_pressed () +void ToolBar::colPicker_pressed (GdkEventButton* event) { - handConn.block (true); - cropConn.block (true); + if (event->button == 1) { + { + ConnectionBlocker handBlocker(handConn); + ConnectionBlocker straBlocker(straConn); + ConnectionBlocker cropBlocker(cropConn); + ConnectionBlocker wbWasBlocked(wbTool, wbConn); - if (wbTool) { - wbConn.block (true); + cropTool->set_active (false); + if (wbTool) { + wbTool->set_active (false); + } + straTool->set_active (false); + + if (current != TMColorPicker) { + // Disabling all other tools, enabling the Picker tool and entering the "visible pickers" mode + if (editingMode) { + stopEditMode(); + if (listener) { + listener->editModeSwitchedOff (); + } + } + handTool->set_active (false); + showColorPickers(true); + current = TMColorPicker; + if (pickerListener) { + pickerListener->switchPickerVisibility (showColPickers); + } + } else { + // Disabling the picker tool, enabling the Hand tool and keeping the "visible pickers" mode + handTool->set_active (true); + //colPickerTool->set_active (false); Done by the standard event handler + current = TMHand; + } + + } + + if (listener) { + listener->toolSelected (current); + } + } else if (event->button == 3) { + if (current == TMColorPicker) { + // Disabling the Picker tool and entering into the "invisible pickers" mode + ConnectionBlocker handBlocker(handConn); + ConnectionBlocker cpWasBlocked(cpConn); + handTool->set_active (true); + colPickerTool->set_active (false); + current = TMHand; + showColorPickers(false); + } else { + // The Picker tool is already disabled, entering into the "invisible pickers" mode + switchColorPickersVisibility(); + } + if (pickerListener) { + pickerListener->switchPickerVisibility (showColPickers); + } + } +} + +bool ToolBar::showColorPickers(bool showCP) +{ + if (showColPickers != showCP) { + // Inverting the state + colPickerTool->set_image(showCP ? *showcolpickersimg : *hidecolpickersimg); + showColPickers = showCP; + return true; } - straConn.block (true); + return false; +} + +void ToolBar::switchColorPickersVisibility() +{ + // Inverting the state + showColPickers = !showColPickers; + colPickerTool->set_image(showColPickers ? *showcolpickersimg : *hidecolpickersimg); +} + +void ToolBar::crop_pressed () +{ + { + ConnectionBlocker handBlocker(handConn); + ConnectionBlocker straBlocker(straConn); + ConnectionBlocker cropBlocker(cropConn); + ConnectionBlocker wbWasBlocked(wbTool, wbConn), cpWasBlocked(colPickerTool, cpConn); if (current != TMCropSelect) { + if (editingMode) { + stopEditMode(); + if (listener) { + listener->editModeSwitchedOff (); + } + } handTool->set_active (false); - + if (colPickerTool) { + colPickerTool->set_active(false); + } if (wbTool) { wbTool->set_active (false); } @@ -282,10 +386,9 @@ void ToolBar::crop_pressed () } cropTool->set_active (true); - handConn.block (false); - cropConn.block (false); - wbConn.block (false); - straConn.block (false); + cropTool->grab_focus (); + + } if (listener) { listener->toolSelected (TMCropSelect); @@ -294,19 +397,23 @@ void ToolBar::crop_pressed () void ToolBar::stra_pressed () { - - handConn.block (true); - cropConn.block (true); - - if (wbTool) { - wbConn.block (true); - } - - straConn.block (true); + { + ConnectionBlocker handBlocker(handConn); + ConnectionBlocker straBlocker(straConn); + ConnectionBlocker cropBlocker(cropConn); + ConnectionBlocker wbWasBlocked(wbTool, wbConn), cpWasBlocked(colPickerTool, cpConn); if (current != TMStraighten) { + if (editingMode) { + stopEditMode(); + if (listener) { + listener->editModeSwitchedOff (); + } + } handTool->set_active (false); - + if (colPickerTool) { + colPickerTool->set_active(false); + } if (wbTool) { wbTool->set_active (false); } @@ -316,15 +423,9 @@ void ToolBar::stra_pressed () } straTool->set_active (true); - handConn.block (false); - cropConn.block (false); - if (wbTool) { - wbConn.block (false); } - straConn.block (false); - if (listener) { listener->toolSelected (TMStraighten); } @@ -371,12 +472,17 @@ bool ToolBar::handleShortcutKey (GdkEventKey* event) return false; } -void ToolBar::removeWbTool() +void ToolBar::setBatchMode() { if (wbTool) { wbConn.disconnect(); removeIfThere(this, wbTool, false); - wbTool = NULL; + wbTool = nullptr; + } + if (colPickerTool) { + cpConn.disconnect(); + removeIfThere(this, colPickerTool, false); + colPickerTool = nullptr; } } diff --git a/rtgui/toolbar.h b/rtgui/toolbar.h index e00520721..c5bc68696 100644 --- a/rtgui/toolbar.h +++ b/rtgui/toolbar.h @@ -22,6 +22,7 @@ #include #include "toolenum.h" #include "rtimage.h" +#include "lockablecolorpicker.h" class ToolBarListener { @@ -40,17 +41,31 @@ class ToolBar : public Gtk::HBox private: RTImage* handimg; RTImage* editinghandimg; + RTImage* showcolpickersimg; + RTImage* hidecolpickersimg; + bool showColPickers; + + void hand_pressed (); + void wb_pressed (); + void colPicker_pressed (GdkEventButton* event); + void crop_pressed (); + void stra_pressed (); + bool showColorPickers(bool showCP); + void switchColorPickersVisibility(); protected: Gtk::ToggleButton* handTool; Gtk::ToggleButton* wbTool; + Gtk::ToggleButton* colPickerTool; Gtk::ToggleButton* cropTool; Gtk::ToggleButton* straTool; ToolBarListener* listener; + LockablePickerToolListener* pickerListener; ToolMode current; bool editingMode; // true if the cursor is being used to remotely edit tool's values sigc::connection handConn; sigc::connection wbConn; + sigc::connection cpConn; sigc::connection cropConn; sigc::connection straConn; @@ -64,21 +79,25 @@ public: return current; } + bool showColorPickers() { + return showColPickers; + } + void setToolBarListener (ToolBarListener* tpl) { listener = tpl; } + void setLockablePickerToolListener (LockablePickerToolListener* lptl) + { + pickerListener = lptl; + } + void startEditMode(); void stopEditMode(); - void hand_pressed (); - void wb_pressed (); - void crop_pressed (); - void stra_pressed (); - bool handleShortcutKey (GdkEventKey* event); - void removeWbTool(); + void setBatchMode(); }; #endif diff --git a/rtgui/toolenum.h b/rtgui/toolenum.h index f06fda376..06212682a 100644 --- a/rtgui/toolenum.h +++ b/rtgui/toolenum.h @@ -19,6 +19,6 @@ #ifndef _TOOLENUM_ #define _TOOLENUM_ -enum ToolMode {TMHand = 0, TMSpotWB = 1, TMCropSelect = 2, TMStraighten = 3}; +enum ToolMode {TMHand = 0, TMSpotWB = 1, TMCropSelect = 2, TMStraighten = 3, TMColorPicker = 4}; #endif diff --git a/rtgui/toolpanel.cc b/rtgui/toolpanel.cc index fdee3fa79..0b94359d0 100644 --- a/rtgui/toolpanel.cc +++ b/rtgui/toolpanel.cc @@ -65,7 +65,7 @@ void ToolParamBlock::on_style_changed (const Glib::RefPtr& style) updateStyle(); } -FoldableToolPanel::FoldableToolPanel(Gtk::Box* content, Glib::ustring toolName, Glib::ustring UILabel, bool need11, bool useEnabled) : ToolPanel(toolName, need11), parentContainer(NULL), exp(NULL), lastEnabled(true) +FoldableToolPanel::FoldableToolPanel(Gtk::Box* content, Glib::ustring toolName, Glib::ustring UILabel, bool need11, bool useEnabled) : ToolPanel(toolName, need11), parentContainer(nullptr), exp(nullptr), lastEnabled(true) { if (!content) { return; diff --git a/rtgui/toolpanel.h b/rtgui/toolpanel.h index 69a8d18ac..d7d0dc662 100644 --- a/rtgui/toolpanel.h +++ b/rtgui/toolpanel.h @@ -75,17 +75,17 @@ protected: public: - ToolPanel (Glib::ustring toolName = "", bool need11 = false) : toolName(toolName), listener(NULL), tmp(NULL), batchMode(false), multiImage(false), need100Percent(need11) {} + ToolPanel (Glib::ustring toolName = "", bool need11 = false) : toolName(toolName), listener(nullptr), tmp(nullptr), batchMode(false), multiImage(false), need100Percent(need11) {} virtual ~ToolPanel() {} virtual void setParent (Gtk::Box* parent) {} virtual Gtk::Box* getParent () { - return NULL; + return nullptr; } virtual MyExpander* getExpander () { - return NULL; + return nullptr; } virtual void setExpanded (bool expanded) {} virtual bool getExpanded () @@ -101,13 +101,13 @@ public: listener = tpl; } virtual void setEditProvider (EditDataProvider *provider) {} - virtual void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL) {} - virtual void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL) {} + virtual void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr) {} + virtual void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr) {} virtual void trimValues (rtengine::procparams::ProcParams* pp) { return; } - virtual void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL) {} + virtual void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) {} virtual void autoOpenCurve () {} /** @brief Disable the event broadcasting mechanism @@ -116,12 +116,12 @@ public: */ bool disableListener () { - if (tmp == NULL) { + if (tmp == nullptr) { tmp = listener; } - bool prevState = listener != NULL; - listener = NULL; + bool prevState = listener != nullptr; + listener = nullptr; return prevState; } @@ -129,11 +129,11 @@ public: */ void enableListener () { - if (tmp != NULL) { + if (tmp != nullptr) { listener = tmp; } - tmp = NULL; + tmp = nullptr; } virtual void setBatchMode (bool batchMode) diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc index 65e006361..2b34891e5 100644 --- a/rtgui/toolpanelcoord.cc +++ b/rtgui/toolpanelcoord.cc @@ -519,7 +519,7 @@ void ToolPanelCoordinator::closeImage () if (ipc) { ipc->stopProcessing (); - ipc = NULL; + ipc = nullptr; } } @@ -649,7 +649,7 @@ void ToolPanelCoordinator::autoCropRequested () rtengine::RawImage* ToolPanelCoordinator::getDF() { if (!ipc) { - return NULL; + return nullptr; } const rtengine::ImageMetaData *imd = ipc->getInitialImage()->getMetaData(); @@ -664,13 +664,13 @@ rtengine::RawImage* ToolPanelCoordinator::getDF() return rtengine::dfm.searchDarkFrame( maker, model, iso, shutter, timestamp); } - return NULL; + return nullptr; } rtengine::RawImage* ToolPanelCoordinator::getFF() { if (!ipc) { - return NULL; + return nullptr; } const rtengine::ImageMetaData *imd = ipc->getInitialImage()->getMetaData(); @@ -688,7 +688,7 @@ rtengine::RawImage* ToolPanelCoordinator::getFF() return rtengine::ffm.searchFlatField( maker, model, lens, focallength, aperture, timestamp); } - return NULL; + return nullptr; } Glib::ustring ToolPanelCoordinator::GetCurrentImageFilePath() @@ -767,7 +767,7 @@ void ToolPanelCoordinator::foldAllButOne (Gtk::Box* parent, FoldableToolPanel* o { for (auto toolPanel : toolPanels) { - if (toolPanel->getParent() != NULL) { + if (toolPanel->getParent() != nullptr) { ToolPanel* currentTP = toolPanel; if (currentTP->getParent() == parent) { diff --git a/rtgui/toolpanelcoord.h b/rtgui/toolpanelcoord.h index bdd8118c0..918a0e2c9 100644 --- a/rtgui/toolpanelcoord.h +++ b/rtgui/toolpanelcoord.h @@ -232,7 +232,7 @@ public: void panelChanged (rtengine::ProcEvent event, const Glib::ustring& descr); // profilechangelistener interface - void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = NULL); + void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = nullptr); void setDefaults (rtengine::procparams::ProcParams* defparams); // DirSelectionListener interface @@ -289,21 +289,15 @@ public: void saveInputICCReference (Glib::ustring fname, bool apply_wb); // imageareatoollistener interface - void spotWBselected (int x, int y, Thumbnail* thm = NULL); + void spotWBselected (int x, int y, Thumbnail* thm = nullptr); void cropSelectionReady (); - void rotateSelectionReady (double rotate_deg, Thumbnail* thm = NULL); + void rotateSelectionReady (double rotate_deg, Thumbnail* thm = nullptr); ToolBar* getToolBar () { return toolBar; } - void removeWbTool() - { - if (toolBar) { - toolBar->removeWbTool(); - } - } int getSpotWBRectSize (); - CropGUIListener* startCropEditing (Thumbnail* thm = NULL) + CropGUIListener* startCropEditing (Thumbnail* thm = nullptr) { return crop; } diff --git a/rtgui/vibrance.h b/rtgui/vibrance.h index e8afbbad0..ceb010434 100644 --- a/rtgui/vibrance.h +++ b/rtgui/vibrance.h @@ -54,9 +54,9 @@ public: Vibrance (); ~Vibrance (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void trimValues (rtengine::procparams::ProcParams* pp); void setAdjusterBehavior (bool pastelsadd, bool saturatedadd); diff --git a/rtgui/vignetting.h b/rtgui/vignetting.h index 6909b5af7..029f16808 100644 --- a/rtgui/vignetting.h +++ b/rtgui/vignetting.h @@ -37,9 +37,9 @@ public: Vignetting (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/wavelet.cc b/rtgui/wavelet.cc index abab1d2d1..2d7f6dd2e 100644 --- a/rtgui/wavelet.cc +++ b/rtgui/wavelet.cc @@ -27,111 +27,170 @@ using namespace rtengine; using namespace rtengine::procparams; extern Options options; -Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), true, true) +namespace +{ + + GradientMilestone makeHsvGm(double position, float h, float s, float v) + { + float r; + float g; + float b; + Color::hsv2rgb01(h, s, v, r, g, b); + return GradientMilestone(position, r, g, b); + } + + std::vector makeWholeHueRange() + { + std::vector res; + res.reserve(7); + + for (int i = 0; i < 7; ++i) { + const float x = static_cast(i) / 6.0f; + res.push_back(makeHsvGm(x, x, 0.5f, 0.5f)); + } + + return res; + } + +} + +Wavelet::Wavelet() : + FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), true, true), + curveEditorG(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_CONTEDIT"))), + CCWcurveEditorG(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_CCURVE"))), + curveEditorRES(new CurveEditorGroup(options.lastWaveletCurvesDir)), + curveEditorGAM(new CurveEditorGroup(options.lastWaveletCurvesDir)), + separatorNeutral(Gtk::manage(new Gtk::HSeparator())), + separatoredge(Gtk::manage(new Gtk::HSeparator())), + opaCurveEditorG(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_COLORT"))), + opacityCurveEditorG(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_OPACITY"))), + opacityCurveEditorW(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_OPACITYW"))), + opacityCurveEditorWL(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_OPACITYWL"))), + median(Gtk::manage(new Gtk::CheckButton(M("TP_WAVELET_MEDI")))), + medianlev(Gtk::manage(new Gtk::CheckButton(M("TP_WAVELET_MEDILEV")))), + linkedg(Gtk::manage(new Gtk::CheckButton(M("TP_WAVELET_LINKEDG")))), + cbenab(Gtk::manage(new Gtk::CheckButton(M("TP_WAVELET_CBENAB")))), + lipst(Gtk::manage(new Gtk::CheckButton(M("TP_WAVELET_LIPST")))), + avoid(Gtk::manage(new Gtk::CheckButton(M("TP_WAVELET_AVOID")))), + tmr(Gtk::manage(new Gtk::CheckButton(M("TP_WAVELET_BALCHRO")))), + neutralchButton(Gtk::manage(new Gtk::Button(M("TP_WAVELET_NEUTRAL")))), + rescon(Gtk::manage(new Adjuster(M("TP_WAVELET_RESCON"), -100, 100, 1, 0))), + resconH(Gtk::manage(new Adjuster(M("TP_WAVELET_RESCONH"), -100, 100, 1, 0))), + reschro(Gtk::manage(new Adjuster(M("TP_WAVELET_RESCHRO"), -100, 100, 1, 0))), + tmrs(Gtk::manage(new Adjuster(M("TP_WAVELET_TMSTRENGTH"), -1.0, 2.0, 0.01, 0.0))), + gamma(Gtk::manage(new Adjuster(M("TP_WAVELET_COMPGAMMA"), 0.4, 2.0, 0.01, 1.0))), + sup(Gtk::manage(new Adjuster(M("TP_WAVELET_SUPE"), -100, 350, 1, 0))), + sky(Gtk::manage(new Adjuster(M("TP_WAVELET_SKY"), -100., 100.0, 1., 0.))), + thres(Gtk::manage(new Adjuster(M("TP_WAVELET_LEVELS"), 4, 9, 1, 7))),//3 + chroma(Gtk::manage(new Adjuster(M("TP_WAVELET_CHRO"), 1, 9, 1, 5))), + chro(Gtk::manage(new Adjuster(M("TP_WAVELET_CHR"), 0., 100., 1., 0.))), + contrast(Gtk::manage(new Adjuster(M("TP_WAVELET_CONTRA"), -100, 100, 1, 0))), + thr(Gtk::manage(new Adjuster(M("TP_WAVELET_THR"), 0, 100, 1, 35))), + thrH(Gtk::manage(new Adjuster(M("TP_WAVELET_THRH"), 0, 100, 1, 65))), + skinprotect(Gtk::manage( new Adjuster(M("TP_WAVELET_SKIN"), -100, 100, 1, 0.) )), + edgrad(Gtk::manage( new Adjuster(M("TP_WAVELET_EDRAD"), 0, 100, 1, 15) )), + edgval(Gtk::manage( new Adjuster(M("TP_WAVELET_EDVAL"), 0, 100, 1, 0) )), + edgthresh(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGTHRESH"), -50, 100, 1, 10 ))), + strength(Gtk::manage(new Adjuster(M("TP_WAVELET_STRENGTH"), 0, 100, 1, 100))), + balance(Gtk::manage(new Adjuster(M("TP_WAVELET_BALANCE"), -30, 100, 1, 0))), + iter(Gtk::manage(new Adjuster(M("TP_WAVELET_ITER"), -3, 3, 1, 0))), + hueskin(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_HUESKIN"), -314., 314., -5., 25., 170., 120., 0, false))), + hueskin2(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_HUESKY"), -314., 314., -260., -250, -130., -140., 0, false))), + hllev(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_HIGHLIGHT"), 0., 100., 50., 75., 100., 98., 0, false))), + bllev(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LOWLIGHT"), 0., 100., 0., 2., 50., 25., 0, false))), + pastlev(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_PASTEL"), 0., 70., 0., 2., 30., 20., 0, false))), + satlev(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_SAT"), 0., 130., 30., 45., 130., 100., 0, false))), + edgcont(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_EDGCONT"), 0., 100., options.rtSettings.bot_left, options.rtSettings.top_left, options.rtSettings.bot_right, options.rtSettings.top_right, 0., false))), + level0noise(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LEVZERO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false))), + level1noise(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LEVONE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false))), + level2noise(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LEVTWO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false))), + level3noise(Gtk::manage(new ThresholdAdjuster(M("TP_WAVELET_LEVTHRE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., nullptr, false))), + threshold(Gtk::manage(new Adjuster(M("TP_WAVELET_THRESHOLD"), 1, 9, 1, 5))), + threshold2(Gtk::manage(new Adjuster(M("TP_WAVELET_THRESHOLD2"), 1, 9, 1, 4))), + edgedetect(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGEDETECT"), 0, 100, 1, 90))), + edgedetectthr(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGEDETECTTHR"), 0, 100, 1, 20))), + edgedetectthr2(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGEDETECTTHR2"), -10, 100, 1, 0))), + edgesensi(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGESENSI"), 0, 100, 1, 60))), + edgeampli(Gtk::manage(new Adjuster(M("TP_WAVELET_EDGEAMPLI"), 0, 100, 1, 10))), + Lmethod(Gtk::manage(new MyComboBoxText())), + CHmethod(Gtk::manage(new MyComboBoxText())), + CHSLmethod(Gtk::manage(new MyComboBoxText())), + EDmethod(Gtk::manage(new MyComboBoxText())), + BAmethod(Gtk::manage(new MyComboBoxText())), + NPmethod(Gtk::manage(new MyComboBoxText())), + TMmethod(Gtk::manage(new MyComboBoxText())), + HSmethod(Gtk::manage(new MyComboBoxText())), + CLmethod(Gtk::manage(new MyComboBoxText())), + Backmethod(Gtk::manage(new MyComboBoxText())), + Tilesmethod(Gtk::manage(new MyComboBoxText())), + daubcoeffmethod(Gtk::manage(new MyComboBoxText())), + Dirmethod(Gtk::manage(new MyComboBoxText())), + Medgreinf(Gtk::manage(new MyComboBoxText())), + chanMixerHLFrame(Gtk::manage(new Gtk::Frame(M("TP_COLORTONING_HIGHLIGHT")))), + chanMixerMidFrame(Gtk::manage(new Gtk::Frame(M("TP_COLORTONING_MIDTONES")))), + chanMixerShadowsFrame(Gtk::manage(new Gtk::Frame(M("TP_COLORTONING_SHADOWS")))), + wavLabels(Gtk::manage(new Gtk::Label("---", Gtk::ALIGN_CENTER))), + labmC(Gtk::manage(new Gtk::Label(M("TP_WAVELET_CTYPE") + ":"))), + labmNP(Gtk::manage(new Gtk::Label(M("TP_WAVELET_NPTYPE") + ":"))), + expchroma(new MyExpander(true, M("TP_WAVELET_LEVCH"))), + expcontrast(new MyExpander(true, M("TP_WAVELET_LEVF"))), + expedge(new MyExpander(true, M("TP_WAVELET_EDGE"))), + expfinal(new MyExpander(true, M("TP_WAVELET_FINAL"))), + expgamut(new MyExpander(false, M("TP_WAVELET_CONTR"))), + expnoise(new MyExpander(true, M("TP_WAVELET_NOISE"))), + expresid(new MyExpander(true, M("TP_WAVELET_RESID"))), + expsettings(new MyExpander(false, M("TP_WAVELET_SETTINGS"))), + exptoning(new MyExpander(true, M("TP_WAVELET_TON"))), + neutrHBox(Gtk::manage(new Gtk::HBox())) { - std::vector milestones; CurveListener::setMulti(true); nextnlevel = 7.; - float r, g, b; - //from -PI to +PI (radians) convert to hsv and draw bottombar - Color::hsv2rgb01(0.4199, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.0 , r, g, b) ); // hsv: 0.4199 rad: -3.14 - Color::hsv2rgb01(0.5000, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.054 , r, g, b) ); // hsv: 0.5 rad: -2.8 - Color::hsv2rgb01(0.6000, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.1336, r, g, b) ); // hsv: 0.60 rad: -2.3 - Color::hsv2rgb01(0.7500, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.3567, r, g, b) ); // hsv: 0.75 rad: -0.9 - Color::hsv2rgb01(0.8560, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.4363, r, g, b) ); // hsv: 0.856 rad: -0.4 - Color::hsv2rgb01(0.9200, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.4841, r, g, b) ); // hsv: 0.92 rad: -0.1 - Color::hsv2rgb01(0.9300, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.5000, r, g, b) ); // hsv: 0.93 rad: 0 - Color::hsv2rgb01(0.9600, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.5366, r, g, b) ); // hsv: 0.96 rad: 0.25 - Color::hsv2rgb01(1.0000, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.5955, r, g, b) ); // hsv: 1. rad: 0.6 - Color::hsv2rgb01(0.0675, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.6911, r, g, b) ); // hsv: 0.0675 rad: 1.2 - Color::hsv2rgb01(0.0900, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.7229, r, g, b) ); // hsv: 0.09 rad: 1.4 - Color::hsv2rgb01(0.1700, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.7707, r, g, b) ); // hsv: 0.17 rad: 1.7 - Color::hsv2rgb01(0.2650, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.8503, r, g, b) ); // hsv: 0.265 rad: 2.1 - Color::hsv2rgb01(0.3240, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(0.8981, r, g, b) ); // hsv: 0.324 rad: 2.5 - Color::hsv2rgb01(0.4197, 0.5, 0.5, r, g, b); - milestones.push_back( GradientMilestone(1. , r, g, b) ); // hsv: 0.419 rad: 3.14 - std::vector milestones2; - milestones2.push_back( GradientMilestone(0.0, 0.0, 0.0, 0.0) ); - milestones2.push_back( GradientMilestone(1.0, 1.0, 1.0, 1.0) ); - - std::vector defaultCurve; - - expsettings = new MyExpander (false, M("TP_WAVELET_SETTINGS")); expsettings->signal_button_release_event().connect_notify( sigc::bind( sigc::mem_fun(this, &Wavelet::foldAllButMe), expsettings) ); - expcontrast = new MyExpander (true, M("TP_WAVELET_LEVF")); expcontrast->signal_button_release_event().connect_notify( sigc::bind( sigc::mem_fun(this, &Wavelet::foldAllButMe), expcontrast) ); enableContrastConn = expcontrast->signal_enabled_toggled().connect ( sigc::bind( sigc::mem_fun(this, &Wavelet::enableToggled), expcontrast) ); - expchroma = new MyExpander (true, M("TP_WAVELET_LEVCH")); expchroma->signal_button_release_event().connect_notify( sigc::bind ( sigc::mem_fun(this, &Wavelet::foldAllButMe), expchroma) ); enableChromaConn = expchroma->signal_enabled_toggled().connect ( sigc::bind( sigc::mem_fun(this, &Wavelet::enableToggled), expchroma) ); - exptoning = new MyExpander (true, M("TP_WAVELET_TON")); exptoning->signal_button_release_event().connect_notify( sigc::bind ( sigc::mem_fun(this, &Wavelet::foldAllButMe), exptoning) ); enableToningConn = exptoning->signal_enabled_toggled().connect ( sigc::bind( sigc::mem_fun(this, &Wavelet::enableToggled), exptoning) ); - expnoise = new MyExpander (true, M("TP_WAVELET_NOISE")); expnoise->signal_button_release_event().connect_notify( sigc::bind ( sigc::mem_fun(this, &Wavelet::foldAllButMe), expnoise) ); enableNoiseConn = expnoise->signal_enabled_toggled().connect ( sigc::bind( sigc::mem_fun(this, &Wavelet::enableToggled), expnoise) ); - expedge = new MyExpander (true, M("TP_WAVELET_EDGE")); expedge->signal_button_release_event().connect_notify( sigc::bind ( sigc::mem_fun(this, &Wavelet::foldAllButMe), expedge) ); enableEdgeConn = expedge->signal_enabled_toggled().connect ( sigc::bind( sigc::mem_fun(this, &Wavelet::enableToggled), expedge) ); - expgamut = new MyExpander (false, M("TP_WAVELET_CONTR")); expgamut->signal_button_release_event().connect_notify( sigc::bind ( sigc::mem_fun(this, &Wavelet::foldAllButMe), expgamut) ); - expresid = new MyExpander (true, M("TP_WAVELET_RESID")); expresid->signal_button_release_event().connect_notify( sigc::bind ( sigc::mem_fun(this, &Wavelet::foldAllButMe), expresid) ); enableResidConn = expresid->signal_enabled_toggled().connect ( sigc::bind( sigc::mem_fun(this, &Wavelet::enableToggled), expresid) ); - expfinal = new MyExpander (true, M("TP_WAVELET_FINAL")); expfinal->signal_button_release_event().connect_notify( sigc::bind ( sigc::mem_fun(this, &Wavelet::foldAllButMe), expfinal) ); enableFinalConn = expfinal->signal_enabled_toggled().connect ( sigc::bind( sigc::mem_fun(this, &Wavelet::enableToggled), expfinal) ); // Wavelet Settings - settingsVBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const settingsVBox = Gtk::manage(new Gtk::VBox()); settingsVBox->set_border_width(4); settingsVBox->set_spacing(2); - strength = Gtk::manage (new Adjuster (M("TP_WAVELET_STRENGTH"), 0, 100, 1, 100)); strength->setAdjusterListener (this); - thres = Gtk::manage (new Adjuster (M("TP_WAVELET_LEVELS"), 4, 9, 1, 7));//3 thres->set_tooltip_text (M("TP_WAVELET_LEVELS_TOOLTIP")); thres->setAdjusterListener (this); - tilesizeHBox = Gtk::manage (new Gtk::HBox()); - tilesizeLabel = Gtk::manage (new Gtk::Label (M("TP_WAVELET_TILESIZE") + ":")); - //tilesizeLabel->set_alignment(Gtk::ALIGN_START); - Tilesmethod = Gtk::manage (new MyComboBoxText ()); Tilesmethod->append_text (M("TP_WAVELET_TILESFULL")); Tilesmethod->append_text (M("TP_WAVELET_TILESBIG")); Tilesmethod->append_text (M("TP_WAVELET_TILESLIT")); Tilesmethodconn = Tilesmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::TilesmethodChanged) ); Tilesmethod->set_tooltip_text (M("TP_WAVELET_TILES_TOOLTIP")); + Gtk::HBox* const tilesizeHBox = Gtk::manage(new Gtk::HBox()); + Gtk::Label* const tilesizeLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_TILESIZE") + ":")); tilesizeHBox->pack_start(*tilesizeLabel, Gtk::PACK_SHRINK, 4); tilesizeHBox->pack_start(*Tilesmethod); - daubcoeffHBox = Gtk::manage (new Gtk::HBox()); - daubcoeffLabel = Gtk::manage (new Gtk::Label (M("TP_WAVELET_DAUB") + ":")); - daubcoeffmethod = Gtk::manage (new MyComboBoxText ()); daubcoeffmethod->set_sensitive(true); daubcoeffmethod->append_text (M("TP_WAVELET_DAUB2")); daubcoeffmethod->append_text (M("TP_WAVELET_DAUB4")); @@ -140,32 +199,30 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), daubcoeffmethod->append_text (M("TP_WAVELET_DAUB14")); daubcoeffmethodconn = daubcoeffmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::daubcoeffmethodChanged) ); daubcoeffmethod->set_tooltip_text (M("TP_WAVELET_DAUB_TOOLTIP")); + Gtk::Label* const daubcoeffLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_DAUB") + ":")); + Gtk::HBox* const daubcoeffHBox = Gtk::manage(new Gtk::HBox()); daubcoeffHBox->pack_start(*daubcoeffLabel, Gtk::PACK_SHRINK, 4); daubcoeffHBox->pack_start(*daubcoeffmethod); - backgroundHBox = Gtk::manage (new Gtk::HBox()); - Backmethod = Gtk::manage (new MyComboBoxText ()); Backmethod->append_text (M("TP_WAVELET_B0")); Backmethod->append_text (M("TP_WAVELET_B1")); Backmethod->append_text (M("TP_WAVELET_B2")); Backmethodconn = Backmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::BackmethodChanged) ); - backgroundLabel = Gtk::manage (new Gtk::Label (M("TP_WAVELET_BACKGROUND") + ":")); + Gtk::HBox* const backgroundHBox = Gtk::manage(new Gtk::HBox()); + Gtk::Label* const backgroundLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_BACKGROUND") + ":")); backgroundHBox->pack_start(*backgroundLabel, Gtk::PACK_SHRINK, 4); backgroundHBox->pack_start(*Backmethod); - levdirMainHBox = Gtk::manage (new Gtk::HBox()); - CLmethod = Gtk::manage (new MyComboBoxText ()); CLmethod->append_text (M("TP_WAVELET_LEVDIR_ONE")); CLmethod->append_text (M("TP_WAVELET_LEVDIR_INF")); CLmethod->append_text (M("TP_WAVELET_LEVDIR_SUP")); CLmethod->append_text (M("TP_WAVELET_LEVDIR_ALL")); CLmethodconn = CLmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::CLmethodChanged) ); - levdirMainLabel = Gtk::manage (new Gtk::Label (M("TP_WAVELET_PROC") + ":")); + Gtk::HBox* const levdirMainHBox = Gtk::manage(new Gtk::HBox()); + Gtk::Label* const levdirMainLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_PROC") + ":")); levdirMainHBox->pack_start(*levdirMainLabel, Gtk::PACK_SHRINK, 4); levdirMainHBox->pack_start(*CLmethod); //same - levdirSubHBox = Gtk::manage (new Gtk::HBox()); - Lmethod = Gtk::manage (new MyComboBoxText ()); Lmethod->set_sensitive(false); Lmethod->set_sensitive(false); Lmethod->append_text (M("TP_WAVELET_1")); @@ -180,7 +237,6 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), Lmethod->append_text (M("TP_WAVELET_SUPE")); Lmethod->append_text (M("TP_WAVELET_RESID")); Lmethod->set_active(0); - Dirmethod = Gtk::manage (new MyComboBoxText ()); Dirmethod->set_sensitive(false); Dirmethod->append_text (M("TP_WAVELET_DONE")); Dirmethod->append_text (M("TP_WAVELET_DTWO")); @@ -188,6 +244,7 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), Dirmethod->append_text (M("TP_WAVELET_DALL")); Lmethodconn = Lmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::LmethodChanged) ); Dirmethodconn = Dirmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::DirmethodChanged) ); + Gtk::HBox* const levdirSubHBox = Gtk::manage(new Gtk::HBox()); levdirSubHBox->pack_start(*Lmethod); levdirSubHBox->pack_start(*Dirmethod, Gtk::PACK_EXPAND_WIDGET, 2); // same, but 2 not 4? @@ -200,24 +257,23 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), settingsVBox->pack_start(*levdirSubHBox); // Contrast - Gtk::VBox * levBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const levBox = Gtk::manage (new Gtk::VBox()); levBox->set_border_width(4); levBox->set_spacing(2); - Gtk::HBox * buttonBox = Gtk::manage (new Gtk::HBox(true, 10)); - wavLabels = Gtk::manage(new Gtk::Label("---", Gtk::ALIGN_CENTER)); + Gtk::HBox* const buttonBox = Gtk::manage (new Gtk::HBox(true, 10)); levBox->pack_start(*buttonBox, Gtk::PACK_SHRINK, 2); - Gtk::Button * contrastMinusButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_CONTRAST_MINUS"))); + Gtk::Button* const contrastMinusButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_CONTRAST_MINUS"))); buttonBox->pack_start(*contrastMinusButton); contrastMinusPressedConn = contrastMinusButton->signal_pressed().connect( sigc::mem_fun(*this, &Wavelet::contrastMinusPressed)); - Gtk::Button * neutralButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_NEUTRAL"))); + Gtk::Button* const neutralButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_NEUTRAL"))); buttonBox->pack_start(*neutralButton); neutralPressedConn = neutralButton->signal_pressed().connect( sigc::mem_fun(*this, &Wavelet::neutralPressed)); - Gtk::Button * contrastPlusButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_CONTRAST_PLUS"))); + Gtk::Button* const contrastPlusButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_CONTRAST_PLUS"))); buttonBox->pack_start(*contrastPlusButton); contrastPlusPressedConn = contrastPlusButton->signal_pressed().connect( sigc::mem_fun(*this, &Wavelet::contrastPlusPressed)); @@ -244,35 +300,33 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), levBox->pack_start(*correction[i]); } - sup = Gtk::manage (new Adjuster (M("TP_WAVELET_SUPE"), -100, 350, 1, 0)); levBox->pack_start(*sup); sup->setAdjusterListener (this); wavLabels->show(); levBox->pack_start (*wavLabels); - contrastSHFrame = Gtk::manage (new Gtk::Frame (M("TP_WAVELET_APPLYTO"))); - contrastSHVBox = Gtk::manage (new Gtk::VBox); + Gtk::VBox* const contrastSHVBox = Gtk::manage(new Gtk::VBox); contrastSHVBox->set_border_width(4); contrastSHVBox->set_spacing(2); - HSmethod = Gtk::manage (new MyComboBoxText ()); HSmethod->append_text (M("TP_WAVELET_HS1")); HSmethod->append_text (M("TP_WAVELET_HS2")); HSmethodconn = HSmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::HSmethodChanged) ); - hllev = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_HIGHLIGHT"), 0., 100., 50., 75., 100., 98., 0, false)); + const std::vector milestones2 = { + GradientMilestone(0.0, 0.0, 0.0, 0.0), + GradientMilestone(1.0, 1.0, 1.0, 1.0) + }; + hllev->setAdjusterListener (this); hllev->setBgGradient(milestones2); - threshold = Gtk::manage (new Adjuster (M("TP_WAVELET_THRESHOLD"), 1, 9, 1, 5)); threshold->setAdjusterListener (this); threshold->set_tooltip_text (M("TP_WAVELET_THRESHOLD_TOOLTIP")); - bllev = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LOWLIGHT"), 0., 100., 0., 2., 50., 25., 0, false)); bllev->setAdjusterListener (this); bllev->setBgGradient(milestones2); - threshold2 = Gtk::manage (new Adjuster (M("TP_WAVELET_THRESHOLD2"), 1, 9, 1, 4)); threshold2->setAdjusterListener (this); threshold2->set_tooltip_text (M("TP_WAVELET_THRESHOLD2_TOOLTIP")); @@ -281,19 +335,19 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), contrastSHVBox->pack_start(*threshold); contrastSHVBox->pack_start(*bllev); contrastSHVBox->pack_start(*threshold2); + Gtk::Frame* const contrastSHFrame = Gtk::manage(new Gtk::Frame(M("TP_WAVELET_APPLYTO"))); contrastSHFrame->add(*contrastSHVBox); levBox->pack_start(*contrastSHFrame); // Chromaticity - Gtk::VBox * chBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const chBox = Gtk::manage (new Gtk::VBox()); chBox->set_border_width(4); chBox->set_spacing(2); - ctboxch = Gtk::manage (new Gtk::HBox ()); - labmch = Gtk::manage (new Gtk::Label (M("TP_WAVELET_CHTYPE") + ":")); + Gtk::Label* const labmch = Gtk::manage(new Gtk::Label(M("TP_WAVELET_CHTYPE") + ":")); + Gtk::HBox* const ctboxch = Gtk::manage(new Gtk::HBox()); ctboxch->pack_start (*labmch, Gtk::PACK_SHRINK, 1); - CHmethod = Gtk::manage (new MyComboBoxText ()); CHmethod->append_text (M("TP_WAVELET_CH1")); CHmethod->append_text (M("TP_WAVELET_CH2")); CHmethod->append_text (M("TP_WAVELET_CH3")); @@ -301,44 +355,36 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), ctboxch->pack_start(*CHmethod); chBox->pack_start(*ctboxch); - ctboxCH = Gtk::manage (new Gtk::HBox ()); - labmC = Gtk::manage (new Gtk::Label (M("TP_WAVELET_CTYPE") + ":")); + Gtk::HBox* const ctboxCH = Gtk::manage(new Gtk::HBox()); ctboxCH->pack_start (*labmC, Gtk::PACK_SHRINK, 1); - CHSLmethod = Gtk::manage (new MyComboBoxText ()); CHSLmethod->append_text (M("TP_WAVELET_CHSL")); CHSLmethod->append_text (M("TP_WAVELET_CHCU")); CHSLmethodconn = CHSLmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::CHSLmethodChanged) ); ctboxCH->pack_start(*CHSLmethod); - Gtk::HSeparator *separatorChromaMethod = Gtk::manage (new Gtk::HSeparator()); + Gtk::HSeparator* const separatorChromaMethod = Gtk::manage (new Gtk::HSeparator()); chBox->pack_start(*separatorChromaMethod, Gtk::PACK_SHRINK, 2); - chroma = Gtk::manage (new Adjuster (M("TP_WAVELET_CHRO"), 1, 9, 1, 5)); chroma->set_tooltip_text (M("TP_WAVELET_CHRO_TOOLTIP")); chBox->pack_start(*chroma); chroma->setAdjusterListener (this); - satlev = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_SAT"), 0., 130., 30., 45., 130., 100., 0, false)); satlev->setAdjusterListener (this); satlev->setBgGradient(milestones2); - pastlev = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_PASTEL"), 0., 70., 0., 2., 30., 20., 0, false)); pastlev->setAdjusterListener (this); pastlev->setBgGradient(milestones2); chBox->pack_start(*pastlev); chBox->pack_start(*satlev); - chro = Gtk::manage (new Adjuster (M("TP_WAVELET_CHR"), 0., 100., 1., 0.)); chro->set_tooltip_text (M("TP_WAVELET_CHR_TOOLTIP")); chBox->pack_start(*chro); chro->setAdjusterListener (this); - Gtk::HBox * buttonchBox = Gtk::manage (new Gtk::HBox(true, 10)); - neutralchButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_NEUTRAL"))); + Gtk::HBox* const buttonchBox = Gtk::manage (new Gtk::HBox(true, 10)); neutralchPressedConn = neutralchButton->signal_pressed().connect( sigc::mem_fun(*this, &Wavelet::neutralchPressed)); - separatorNeutral = Gtk::manage (new Gtk::HSeparator()); chBox->pack_start(*separatorNeutral, Gtk::PACK_SHRINK, 2); buttonchBox->pack_start(*neutralchButton); buttonchBox->show_all_children(); @@ -366,15 +412,16 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), } // Toning - Gtk::VBox * tonBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const tonBox = Gtk::manage (new Gtk::VBox()); tonBox->set_border_width(4); tonBox->set_spacing(2); - opaCurveEditorG = new CurveEditorGroup (options.lastWaveletCurvesDir, M("TP_WAVELET_COLORT")); opaCurveEditorG->setCurveListener (this); + std::vector defaultCurve; + rtengine::WaveletParams::getDefaultOpacityCurveRG(defaultCurve); - opacityShapeRG = static_cast(opaCurveEditorG->addCurve(CT_Flat, "", NULL, false)); + opacityShapeRG = static_cast(opaCurveEditorG->addCurve(CT_Flat, "", nullptr, false, false)); opacityShapeRG->setIdentityValue(0.); opacityShapeRG->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); @@ -383,11 +430,10 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), tonBox->pack_start( *opaCurveEditorG, Gtk::PACK_SHRINK, 2); - opacityCurveEditorG = new CurveEditorGroup (options.lastWaveletCurvesDir, M("TP_WAVELET_OPACITY")); opacityCurveEditorG->setCurveListener (this); rtengine::WaveletParams::getDefaultOpacityCurveBY(defaultCurve); - opacityShapeBY = static_cast(opacityCurveEditorG->addCurve(CT_Flat, "", NULL, false)); + opacityShapeBY = static_cast(opacityCurveEditorG->addCurve(CT_Flat, "", nullptr, false, false)); opacityShapeBY->setIdentityValue(0.); opacityShapeBY->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); @@ -397,28 +443,23 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), tonBox->pack_start( *opacityCurveEditorG, Gtk::PACK_SHRINK, 2); // Denoise and Refine - Gtk::VBox * noiseBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const noiseBox = Gtk::manage (new Gtk::VBox()); noiseBox->set_border_width(4); noiseBox->set_spacing(2); - linkedg = Gtk::manage (new Gtk::CheckButton (M("TP_WAVELET_LINKEDG"))); linkedg->set_active (true); linkedgConn = linkedg->signal_toggled().connect( sigc::mem_fun(*this, &Wavelet::linkedgToggled) ); noiseBox->pack_start(*linkedg); - level0noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVZERO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., NULL, false)); level0noise->setAdjusterListener (this); level0noise->setUpdatePolicy(RTUP_DYNAMIC); - level1noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVONE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., NULL, false)); level1noise->setAdjusterListener (this); level1noise->setUpdatePolicy(RTUP_DYNAMIC); - level2noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVTWO"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., NULL, false)); level2noise->setAdjusterListener (this); level2noise->setUpdatePolicy(RTUP_DYNAMIC); - level3noise = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_LEVTHRE"), -30., 100., 0., M("TP_WAVELET_STREN"), 1., 0., 100., 0., M("TP_WAVELET_NOIS"), 1., NULL, false)); level3noise->setAdjusterListener (this); level3noise->setUpdatePolicy(RTUP_DYNAMIC); @@ -428,29 +469,25 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), noiseBox->pack_start( *level3noise, Gtk::PACK_SHRINK, 0); // Edge Sharpness - Gtk::VBox * edgBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const edgBox = Gtk::manage (new Gtk::VBox()); edgBox->set_border_width(4); edgBox->set_spacing(2); - edgval = Gtk::manage ( new Adjuster (M("TP_WAVELET_EDVAL"), 0, 100, 1, 0) ); edgval->setAdjusterListener(this); edgBox->pack_start(*edgval); - edgrad = Gtk::manage ( new Adjuster (M("TP_WAVELET_EDRAD"), 0, 100, 1, 15) ); edgrad->setAdjusterListener(this); edgBox->pack_start(*edgrad); edgrad->set_tooltip_markup (M("TP_WAVELET_EDRAD_TOOLTIP")); - edgthresh = Gtk::manage (new Adjuster (M("TP_WAVELET_EDGTHRESH"), -50, 100, 1, 10 )); edgthresh->setAdjusterListener (this); edgthresh->set_tooltip_markup (M("TP_WAVELET_EDGTHRESH_TOOLTIP")); edgBox->pack_start (*edgthresh); - edbox = Gtk::manage (new Gtk::HBox ()); - labmedgr = Gtk::manage (new Gtk::Label (M("TP_WAVELET_MEDGREINF") + ":")); + Gtk::Label* const labmedgr = Gtk::manage(new Gtk::Label(M("TP_WAVELET_MEDGREINF") + ":")); + Gtk::HBox* const edbox = Gtk::manage(new Gtk::HBox()); edbox->pack_start (*labmedgr, Gtk::PACK_SHRINK, 1); - Medgreinf = Gtk::manage (new MyComboBoxText ()); Medgreinf->append_text (M("TP_WAVELET_RE1")); Medgreinf->append_text (M("TP_WAVELET_RE2")); Medgreinf->append_text (M("TP_WAVELET_RE3")); @@ -459,35 +496,28 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), edbox->pack_start(*Medgreinf); edgBox->pack_start(*edbox); - Gtk::HSeparator *separatorlc = Gtk::manage (new Gtk::HSeparator()); + Gtk::HSeparator* const separatorlc = Gtk::manage (new Gtk::HSeparator()); edgBox->pack_start(*separatorlc, Gtk::PACK_SHRINK, 2); - ctboxED = Gtk::manage (new Gtk::HBox ()); - labmED = Gtk::manage (new Gtk::Label (M("TP_WAVELET_EDTYPE") + ":")); + Gtk::Label* const labmED = Gtk::manage(new Gtk::Label(M("TP_WAVELET_EDTYPE") + ":")); + Gtk::HBox* const ctboxED = Gtk::manage(new Gtk::HBox()); ctboxED->pack_start (*labmED, Gtk::PACK_SHRINK, 1); - EDmethod = Gtk::manage (new MyComboBoxText ()); EDmethod->append_text (M("TP_WAVELET_EDSL")); EDmethod->append_text (M("TP_WAVELET_EDCU")); EDmethodconn = EDmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::EDmethodChanged) ); ctboxED->pack_start(*EDmethod); edgBox->pack_start (*ctboxED); - tr = options.rtSettings.top_right; - br = options.rtSettings.bot_right; - tl = options.rtSettings.top_left; - bl = options.rtSettings.bot_left; - edgcont = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_EDGCONT"), 0., 100., bl, tl, br, tr, 0., false)); edgcont->setAdjusterListener (this); edgcont->setBgGradient(milestones2); edgcont->set_tooltip_markup (M("TP_WAVELET_EDGCONT_TOOLTIP")); // <-- Edge Sharpness Local Contrast curve - CCWcurveEditorG = new CurveEditorGroup (options.lastWaveletCurvesDir, M("TP_WAVELET_CCURVE")); CCWcurveEditorG->setCurveListener (this); rtengine::WaveletParams::getDefaultCCWCurve(defaultCurve); - ccshape = static_cast(CCWcurveEditorG->addCurve(CT_Flat, "", NULL, false)); + ccshape = static_cast(CCWcurveEditorG->addCurve(CT_Flat, "", nullptr, false, false)); ccshape->setIdentityValue(0.); ccshape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); @@ -500,66 +530,53 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), edgBox->pack_start (*edgcont); edgBox->pack_start(*CCWcurveEditorG, Gtk::PACK_SHRINK, 4); - medianlev = Gtk::manage (new Gtk::CheckButton (M("TP_WAVELET_MEDILEV"))); medianlev->set_active (true); medianlevConn = medianlev->signal_toggled().connect( sigc::mem_fun(*this, &Wavelet::medianlevToggled) ); medianlev->set_tooltip_text (M("TP_WAVELET_MEDILEV_TOOLTIP")); - Gtk::HSeparator *separatored1 = Gtk::manage (new Gtk::HSeparator()); + Gtk::HSeparator* const separatored1 = Gtk::manage (new Gtk::HSeparator()); edgBox->pack_start(*separatored1, Gtk::PACK_SHRINK, 2); - eddebox = Gtk::manage (new Gtk::HBox ()); - + Gtk::HBox* const eddebox = Gtk::manage(new Gtk::HBox()); edgBox->pack_start (*eddebox); edgBox->pack_start(*medianlev); - edgedetect = Gtk::manage (new Adjuster (M("TP_WAVELET_EDGEDETECT"), 0, 100, 1, 90)); edgedetect->setAdjusterListener (this); edgedetect->set_tooltip_text (M("TP_WAVELET_EDGEDETECT_TOOLTIP")); edgBox->pack_start(*edgedetect); - edgedetectthr = Gtk::manage (new Adjuster (M("TP_WAVELET_EDGEDETECTTHR"), 0, 100, 1, 20)); edgedetectthr->setAdjusterListener (this); edgedetectthr->set_tooltip_text (M("TP_WAVELET_EDGEDETECTTHR_TOOLTIP")); edgBox->pack_start(*edgedetectthr); - edgedetectthr2 = Gtk::manage (new Adjuster (M("TP_WAVELET_EDGEDETECTTHR2"), -10, 100, 1, 0)); edgedetectthr2->setAdjusterListener (this); edgBox->pack_start(*edgedetectthr2); - separatoredge = Gtk::manage (new Gtk::HSeparator()); - edgBox->pack_start(*separatoredge, Gtk::PACK_SHRINK, 2); - lipst = Gtk::manage (new Gtk::CheckButton (M("TP_WAVELET_LIPST"))); lipst->set_active (true); lipstConn = lipst->signal_toggled().connect( sigc::mem_fun(*this, &Wavelet::lipstToggled) ); // lipst->set_tooltip_text (M("TP_WAVELET_LIPST_TOOLTIP")); edgBox->pack_start(*lipst); - edgesensi = Gtk::manage (new Adjuster (M("TP_WAVELET_EDGESENSI"), 0, 100, 1, 60)); edgesensi->setAdjusterListener (this); edgBox->pack_start(*edgesensi); - edgeampli = Gtk::manage (new Adjuster (M("TP_WAVELET_EDGEAMPLI"), 0, 100, 1, 10)); edgeampli->setAdjusterListener (this); edgBox->pack_start(*edgeampli); - Gtk::VBox * ctboxES = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const ctboxES = Gtk::manage (new Gtk::VBox()); ctboxES->set_border_width(4); ctboxES->set_spacing(2); - ctboxNP = Gtk::manage (new Gtk::HBox()); - - labmNP = Gtk::manage (new Gtk::Label (M("TP_WAVELET_NPTYPE") + ":")); + Gtk::HBox* const ctboxNP = Gtk::manage(new Gtk::HBox()); ctboxNP->pack_start (*labmNP, Gtk::PACK_SHRINK, 1); - NPmethod = Gtk::manage (new MyComboBoxText ()); NPmethod->append_text (M("TP_WAVELET_NPNONE")); NPmethod->append_text (M("TP_WAVELET_NPLOW")); NPmethod->append_text (M("TP_WAVELET_NPHIGH")); @@ -572,28 +589,43 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), edgBox->pack_start(*ctboxES); // Gamut - Gtk::VBox * conBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const conBox = Gtk::manage (new Gtk::VBox()); conBox->set_border_width(4); conBox->set_spacing(2); - median = Gtk::manage (new Gtk::CheckButton (M("TP_WAVELET_MEDI"))); median->set_active (true); medianConn = median->signal_toggled().connect( sigc::mem_fun(*this, &Wavelet::medianToggled) ); conBox->pack_start(*median); - hueskin = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_HUESKIN"), -314., 314., -5., 25., 170., 120., 0, false)); hueskin->set_tooltip_markup (M("TP_WAVELET_HUESKIN_TOOLTIP")); + //from -PI to +PI (radians) convert to hsv and draw bottombar + const std::vector milestones = { + makeHsvGm(0.0000, 0.4199f, 0.5f, 0.5f), // hsv: 0.4199 rad: -3.14 + makeHsvGm(0.0540, 0.5000f, 0.5f, 0.5f), // hsv: 0.5 rad: -2.8 + makeHsvGm(0.1336, 0.6000f, 0.5f, 0.5f), // hsv: 0.60 rad: -2.3 + makeHsvGm(0.3567, 0.7500f, 0.5f, 0.5f), // hsv: 0.75 rad: -0.9 + makeHsvGm(0.4363, 0.8560f, 0.5f, 0.5f), // hsv: 0.856 rad: -0.4 + makeHsvGm(0.4841, 0.9200f, 0.5f, 0.5f), // hsv: 0.92 rad: -0.1 + makeHsvGm(0.5000, 0.9300f, 0.5f, 0.5f), // hsv: 0.93 rad: 0 + makeHsvGm(0.5366, 0.9600f, 0.5f, 0.5f), // hsv: 0.96 rad: 0.25 + makeHsvGm(0.5955, 1.0000f, 0.5f, 0.5f), // hsv: 1. rad: 0.6 + makeHsvGm(0.6911, 0.0675f, 0.5f, 0.5f), // hsv: 0.0675 rad: 1.2 + makeHsvGm(0.7229, 0.0900f, 0.5f, 0.5f), // hsv: 0.09 rad: 1.4 + makeHsvGm(0.7707, 0.1700f, 0.5f, 0.5f), // hsv: 0.17 rad: 1.7 + makeHsvGm(0.8503, 0.2650f, 0.5f, 0.5f), // hsv: 0.265 rad: 2.1 + makeHsvGm(0.8981, 0.3240f, 0.5f, 0.5f), // hsv: 0.324 rad: 2.5 + makeHsvGm(1.0000, 0.4197f, 0.5f, 0.5f) // hsv: 0.419 rad: 3.14 + }; + hueskin->setBgGradient(milestones); conBox->pack_start(*hueskin); hueskin->setAdjusterListener (this); - skinprotect = Gtk::manage ( new Adjuster (M("TP_WAVELET_SKIN"), -100, 100, 1, 0.) ); skinprotect->setAdjusterListener(this); conBox->pack_start(*skinprotect); skinprotect->set_tooltip_markup (M("TP_WAVELET_SKIN_TOOLTIP")); - curveEditorGAM = new CurveEditorGroup (options.lastWaveletCurvesDir); curveEditorGAM->setCurveListener (this); Chshape = static_cast(curveEditorGAM->addCurve(CT_Flat, M("TP_WAVELET_CURVEEDITOR_CH"))); @@ -604,138 +636,115 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), conBox->pack_start (*curveEditorGAM, Gtk::PACK_SHRINK, 4); - avoid = Gtk::manage (new Gtk::CheckButton (M("TP_WAVELET_AVOID"))); avoid->set_active (true); avoidConn = avoid->signal_toggled().connect( sigc::mem_fun(*this, &Wavelet::avoidToggled) ); conBox->pack_start(*avoid); // Residual Image - Gtk::VBox * resBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const resBox = Gtk::manage (new Gtk::VBox()); resBox->set_border_width(4); resBox->set_spacing(2); - rescon = Gtk::manage (new Adjuster (M("TP_WAVELET_RESCON"), -100, 100, 1, 0)); rescon->setAdjusterListener (this); resBox->pack_start(*rescon, Gtk::PACK_SHRINK); - thr = Gtk::manage (new Adjuster (M("TP_WAVELET_THR"), 0, 100, 1, 35)); resBox->pack_start(*thr); thr->setAdjusterListener (this); - resconH = Gtk::manage (new Adjuster (M("TP_WAVELET_RESCONH"), -100, 100, 1, 0)); resconH->setAdjusterListener (this); resBox->pack_start(*resconH, Gtk::PACK_SHRINK); - thrH = Gtk::manage (new Adjuster (M("TP_WAVELET_THRH"), 0, 100, 1, 65)); thrH->setAdjusterListener (this); resBox->pack_start(*thrH, Gtk::PACK_SHRINK); - contrast = Gtk::manage (new Adjuster (M("TP_WAVELET_CONTRA"), -100, 100, 1, 0)); contrast->set_tooltip_text (M("TP_WAVELET_CONTRA_TOOLTIP")); contrast->setAdjusterListener (this); resBox->pack_start(*contrast); //keep the possibility to reinstall - reschro = Gtk::manage (new Adjuster (M("TP_WAVELET_RESCHRO"), -100, 100, 1, 0)); reschro->setAdjusterListener (this); resBox->pack_start(*reschro); - ctboxTM = Gtk::manage (new Gtk::HBox ()); - labmTM = Gtk::manage (new Gtk::Label (M("TP_WAVELET_TMTYPE") + ":")); + Gtk::Label* const labmTM = Gtk::manage(new Gtk::Label(M("TP_WAVELET_TMTYPE") + ":")); + Gtk::HBox* const ctboxTM = Gtk::manage(new Gtk::HBox()); ctboxTM->pack_start (*labmTM, Gtk::PACK_SHRINK, 1); - Gtk::HSeparator *separatorR0 = Gtk::manage (new Gtk::HSeparator()); + Gtk::HSeparator* const separatorR0 = Gtk::manage (new Gtk::HSeparator()); resBox->pack_start(*separatorR0, Gtk::PACK_SHRINK, 2); - TMmethod = Gtk::manage (new MyComboBoxText ()); TMmethod->append_text (M("TP_WAVELET_COMPCONT")); TMmethod->append_text (M("TP_WAVELET_COMPTM")); TMmethodconn = TMmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::TMmethodChanged) ); ctboxTM->pack_start(*TMmethod); resBox->pack_start (*ctboxTM); - tmrs = Gtk::manage(new Adjuster (M("TP_WAVELET_TMSTRENGTH"), -1.0, 2.0, 0.01, 0.0)); tmrs->set_tooltip_text (M("TP_WAVELET_TMSTRENGTH_TOOLTIP")); resBox->pack_start(*tmrs); tmrs->setAdjusterListener (this); - gamma = Gtk::manage(new Adjuster (M("TP_WAVELET_COMPGAMMA"), 0.4, 2.0, 0.01, 1.0)); gamma->set_tooltip_text (M("TP_WAVELET_COMPGAMMA_TOOLTIP")); resBox->pack_start(*gamma); gamma->setAdjusterListener (this); - Gtk::HSeparator *separatorR1 = Gtk::manage (new Gtk::HSeparator()); + Gtk::HSeparator* const separatorR1 = Gtk::manage (new Gtk::HSeparator()); resBox->pack_start(*separatorR1, Gtk::PACK_SHRINK, 2); - hueskin2 = Gtk::manage (new ThresholdAdjuster (M("TP_WAVELET_HUESKY"), -314., 314., -260., -250, -130., -140., 0, false)); hueskin2->set_tooltip_markup (M("TP_WAVELET_HUESKY_TOOLTIP")); hueskin2->setBgGradient(milestones); resBox->pack_start(*hueskin2); hueskin2->setAdjusterListener (this); - sky = Gtk::manage (new Adjuster (M("TP_WAVELET_SKY"), -100., 100.0, 1., 0.)); sky->set_tooltip_text (M("TP_WAVELET_SKY_TOOLTIP")); sky->setAdjusterListener (this); resBox->pack_start(*sky); // whole hue range - milestones.clear(); + const std::vector milestones3 = makeWholeHueRange(); - for (int i = 0; i < 7; i++) { - float R, G, B; - float x = float(i) * (1.0f / 6.0); - Color::hsv2rgb01(x, 0.5f, 0.5f, R, G, B); - milestones.push_back( GradientMilestone(double(x), double(R), double(G), double(B)) ); - } - - curveEditorRES = new CurveEditorGroup (options.lastWaveletCurvesDir); curveEditorRES->setCurveListener (this); hhshape = static_cast(curveEditorRES->addCurve(CT_Flat, M("TP_WAVELET_CURVEEDITOR_HH"))); hhshape->setTooltip(M("TP_WAVELET_CURVEEDITOR_HH_TOOLTIP")); hhshape->setCurveColorProvider(this, 5); curveEditorRES->curveListComplete(); - hhshape->setBottomBarBgGradient(milestones); + hhshape->setBottomBarBgGradient(milestones3); resBox->pack_start (*curveEditorRES, Gtk::PACK_SHRINK, 4); // Toning and Color Balance - Gtk::HSeparator *separatorCB = Gtk::manage (new Gtk::HSeparator()); + Gtk::HSeparator* const separatorCB = Gtk::manage (new Gtk::HSeparator()); - Gtk::VBox *chanMixerHLBox = Gtk::manage (new Gtk::VBox()); - Gtk::VBox *chanMixerMidBox = Gtk::manage (new Gtk::VBox()); - Gtk::VBox *chanMixerShadowsBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const chanMixerHLBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const chanMixerMidBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const chanMixerShadowsBox = Gtk::manage (new Gtk::VBox()); - cbenab = Gtk::manage (new Gtk::CheckButton (M("TP_WAVELET_CBENAB"))); cbenab->set_active (true); cbenabConn = cbenab->signal_toggled().connect( sigc::mem_fun(*this, &Wavelet::cbenabToggled) ); cbenab->set_tooltip_text (M("TP_WAVELET_CB_TOOLTIP")); - Gtk::Image* iblueR = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); - Gtk::Image* iyelL = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); - Gtk::Image* imagL = Gtk::manage (new RTImage ("ajd-wb-green1.png")); - Gtk::Image* igreenR = Gtk::manage (new RTImage ("ajd-wb-green2.png")); + Gtk::Image* const iblueR = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); + Gtk::Image* const iyelL = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); + Gtk::Image* const imagL = Gtk::manage (new RTImage ("ajd-wb-green1.png")); + Gtk::Image* const igreenR = Gtk::manage (new RTImage ("ajd-wb-green2.png")); - Gtk::Image* iblueRm = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); - Gtk::Image* iyelLm = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); - Gtk::Image* imagLm = Gtk::manage (new RTImage ("ajd-wb-green1.png")); - Gtk::Image* igreenRm = Gtk::manage (new RTImage ("ajd-wb-green2.png")); + Gtk::Image* const iblueRm = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); + Gtk::Image* const iyelLm = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); + Gtk::Image* const imagLm = Gtk::manage (new RTImage ("ajd-wb-green1.png")); + Gtk::Image* const igreenRm = Gtk::manage (new RTImage ("ajd-wb-green2.png")); - Gtk::Image* iblueRh = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); - Gtk::Image* iyelLh = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); - Gtk::Image* imagLh = Gtk::manage (new RTImage ("ajd-wb-green1.png")); - Gtk::Image* igreenRh = Gtk::manage (new RTImage ("ajd-wb-green2.png")); + Gtk::Image* const iblueRh = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); + Gtk::Image* const iyelLh = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); + Gtk::Image* const imagLh = Gtk::manage (new RTImage ("ajd-wb-green1.png")); + Gtk::Image* const igreenRh = Gtk::manage (new RTImage ("ajd-wb-green2.png")); greenhigh = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., igreenRh, imagLh)); - bluehigh = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., iblueRh, iyelLh)); - - greenmed = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., igreenRm, imagLm)); - bluemed = Gtk::manage (new Adjuster ("", -100., 100., 1., 0. , iblueRm , iyelLm)); - - greenlow = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., igreenR, imagL)); - bluelow = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., iblueR , iyelL)); + bluehigh = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., iblueRh, iyelLh)); + greenmed = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., igreenRm, imagLm)); + bluemed = Gtk::manage (new Adjuster ("", -100., 100., 1., 0. , iblueRm , iyelLm)); + greenlow = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., igreenR, imagL)); + bluelow = Gtk::manage (new Adjuster ("", -100., 100., 1., 0., iblueR , iyelL)); chanMixerHLBox->pack_start (*greenhigh); chanMixerHLBox->pack_start (*bluehigh); @@ -753,10 +762,6 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), resBox->pack_start(*separatorCB, Gtk::PACK_SHRINK); - chanMixerHLFrame = Gtk::manage (new Gtk::Frame(M("TP_COLORTONING_HIGHLIGHT"))); - chanMixerMidFrame = Gtk::manage (new Gtk::Frame(M("TP_COLORTONING_MIDTONES"))); - chanMixerShadowsFrame = Gtk::manage (new Gtk::Frame(M("TP_COLORTONING_SHADOWS"))); - chanMixerHLFrame->add(*chanMixerHLBox); chanMixerMidFrame->add(*chanMixerMidBox); chanMixerShadowsFrame->add(*chanMixerShadowsBox); @@ -767,12 +772,11 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), resBox->pack_start(*chanMixerShadowsFrame, Gtk::PACK_SHRINK); // Reset sliders - neutrHBox = Gtk::manage (new Gtk::HBox ()); neutrHBox->set_border_width (2); - neutral = Gtk::manage (new Gtk::Button (M("TP_COLORTONING_NEUTRAL"))); //RTImage *resetImg = Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png")); //neutral->set_image(*resetImg); + Gtk::Button* const neutral = Gtk::manage(new Gtk::Button(M("TP_COLORTONING_NEUTRAL"))); neutral->set_tooltip_text (M("TP_COLORTONING_NEUTRAL_TIP")); neutralconn = neutral->signal_pressed().connect( sigc::mem_fun(*this, &Wavelet::neutral_pressed) ); neutral->show(); @@ -781,19 +785,17 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), resBox->pack_start (*neutrHBox); // Final Touchup - Gtk::VBox * ctboxBA = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const ctboxBA = Gtk::manage (new Gtk::VBox()); ctboxBA->set_border_width(4); ctboxBA->set_spacing(2); //Gtk::HSeparator *separatorfin = Gtk::manage (new Gtk::HSeparator()); //ctboxBA->pack_start(*separatorfin, Gtk::PACK_SHRINK, 2); - ctboxFI = Gtk::manage (new Gtk::HBox()); - - labmBA = Gtk::manage (new Gtk::Label (M("TP_WAVELET_BATYPE") + ":")); + Gtk::Label* const labmBA = Gtk::manage(new Gtk::Label(M("TP_WAVELET_BATYPE") + ":")); + Gtk::HBox* const ctboxFI = Gtk::manage(new Gtk::HBox()); ctboxFI->pack_start (*labmBA, Gtk::PACK_SHRINK, 1); - BAmethod = Gtk::manage (new MyComboBoxText ()); BAmethod->append_text (M("TP_WAVELET_BANONE")); BAmethod->append_text (M("TP_WAVELET_BASLI")); BAmethod->append_text (M("TP_WAVELET_BACUR")); @@ -801,39 +803,30 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), ctboxFI->pack_start(*BAmethod); ctboxBA->pack_start(*ctboxFI); - balance = Gtk::manage (new Adjuster (M("TP_WAVELET_BALANCE"), -30, 100, 1, 0)); balance->setAdjusterListener (this); balance->set_tooltip_text (M("TP_WAVELET_BALANCE_TOOLTIP")); - std::vector milestonesW; - milestonesW.clear(); - milestonesW.push_back( GradientMilestone(0., 0., 0., 0.) ); - milestonesW.push_back( GradientMilestone(1., 1., 1., 1.) ); - - opacityCurveEditorW = new CurveEditorGroup (options.lastWaveletCurvesDir, M("TP_WAVELET_OPACITYW")); opacityCurveEditorW->setCurveListener (this); rtengine::WaveletParams::getDefaultOpacityCurveW(defaultCurve); - opacityShape = static_cast(opacityCurveEditorW->addCurve(CT_Flat, "", NULL, false)); + opacityShape = static_cast(opacityCurveEditorW->addCurve(CT_Flat, "", nullptr, false, false)); opacityShape->setIdentityValue(0.); opacityShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); - opacityShape->setBottomBarBgGradient(milestonesW); + opacityShape->setBottomBarBgGradient(milestones2); // This will add the reset button at the end of the curveType buttons opacityCurveEditorW->curveListComplete(); opacityCurveEditorW->show(); - iter = Gtk::manage (new Adjuster (M("TP_WAVELET_ITER"), -3, 3, 1, 0)); iter->setAdjusterListener (this); iter->set_tooltip_text (M("TP_WAVELET_ITER_TOOLTIP")); - Gtk::HSeparator *separatorbalend = Gtk::manage (new Gtk::HSeparator()); + Gtk::HSeparator* const separatorbalend = Gtk::manage (new Gtk::HSeparator()); - opacityCurveEditorWL = new CurveEditorGroup (options.lastWaveletCurvesDir, M("TP_WAVELET_OPACITYWL")); opacityCurveEditorWL->setCurveListener (this); rtengine::WaveletParams::getDefaultOpacityCurveWL(defaultCurve); - opacityShapeWL = static_cast(opacityCurveEditorWL->addCurve(CT_Flat, "", NULL, false)); + opacityShapeWL = static_cast(opacityCurveEditorWL->addCurve(CT_Flat, "", nullptr, false, false)); opacityShapeWL->setIdentityValue(0.); opacityShapeWL->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); opacityShapeWL->setTooltip(M("TP_WAVELET_OPACITYWL_TOOLTIP")); @@ -842,26 +835,20 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"), opacityCurveEditorWL->curveListComplete(); opacityCurveEditorWL->show(); - curveEditorG = new CurveEditorGroup (options.lastWaveletCurvesDir, M("TP_WAVELET_CONTEDIT")); curveEditorG->setCurveListener (this); clshape = static_cast(curveEditorG->addCurve(CT_Diagonal, M("TP_WAVELET_CURVEEDITOR_CL"))); clshape->setTooltip(M("TP_WAVELET_CURVEEDITOR_CL_TOOLTIP")); - std::vector milestones22; - - milestones22.push_back( GradientMilestone(0., 0., 0., 0.) ); - milestones22.push_back( GradientMilestone(1., 1., 1., 1.) ); - clshape->setBottomBarBgGradient(milestones22); - clshape->setLeftBarBgGradient(milestones22); + clshape->setBottomBarBgGradient(milestones2); + clshape->setLeftBarBgGradient(milestones2); curveEditorG->curveListComplete(); - tmr = Gtk::manage (new Gtk::CheckButton (M("TP_WAVELET_BALCHRO"))); tmr->set_active (true); tmr->set_tooltip_text (M("TP_WAVELET_BALCHRO_TOOLTIP")); tmrConn = tmr->signal_toggled().connect( sigc::mem_fun(*this, &Wavelet::tmrToggled) ); - Gtk::VBox * finalBox = Gtk::manage (new Gtk::VBox()); + Gtk::VBox* const finalBox = Gtk::manage (new Gtk::VBox()); finalBox->set_border_width(4); finalBox->set_spacing(2); diff --git a/rtgui/wavelet.h b/rtgui/wavelet.h index b0bc967ab..ff0964731 100644 --- a/rtgui/wavelet.h +++ b/rtgui/wavelet.h @@ -17,8 +17,7 @@ * 2014 Jacques Desmis */ -#ifndef WAVELET_H_INCLUDED -#define WAVELET_H_INCLUDED +#pragma once #include #include "adjuster.h" @@ -30,208 +29,15 @@ #include "guiutils.h" #include "options.h" -class Wavelet : public ToolParamBlock, public ThresholdAdjusterListener, public AdjusterListener, public CurveListener, public ColorProvider, public rtengine::WaveletListener, public FoldableToolPanel +class Wavelet : + public ToolParamBlock, + public ThresholdAdjusterListener, + public AdjusterListener, + public CurveListener, + public ColorProvider, + public rtengine::WaveletListener, + public FoldableToolPanel { -protected: - Glib::RefPtr bgTTips; - Glib::RefPtr srTTips; - Glib::RefPtr bgPixbuf; - Glib::RefPtr srPixbuf; - CurveEditorGroup* curveEditorG; - - CurveEditorGroup* CCWcurveEditorG; - CurveEditorGroup* curveEditorRES; - CurveEditorGroup* curveEditorGAM; - Gtk::HSeparator* colorSep; - Gtk::HSeparator* separator3; - Gtk::HSeparator* separatorCB; - Gtk::HSeparator* separatorNeutral; - Gtk::HSeparator* separatoredge; - - CurveEditorGroup* opaCurveEditorG; - FlatCurveEditor* opacityShapeRG; - CurveEditorGroup* opacityCurveEditorG; - FlatCurveEditor* opacityShapeBY; - CurveEditorGroup* opacityCurveEditorW; - CurveEditorGroup* opacityCurveEditorWL; - FlatCurveEditor* opacityShape; - FlatCurveEditor* opacityShapeWL; - FlatCurveEditor* hhshape; - FlatCurveEditor* Chshape; - DiagonalCurveEditor* clshape; - Gtk::VBox* chanMixerBox; - - FlatCurveEditor* ccshape; - Gtk::CheckButton * display; - Gtk::CheckButton * displaylevel; - Gtk::CheckButton * displaychro; - Gtk::CheckButton * displaygam; - Gtk::CheckButton * displayres; - Gtk::CheckButton * median; - Gtk::CheckButton * medianlev; - Gtk::CheckButton * linkedg; - Gtk::CheckButton * cbenab; - Gtk::CheckButton * lipst; - Gtk::CheckButton * avoid; - Gtk::CheckButton * tmr; - - Gtk::Button * neutralchButton; - Adjuster* correction[9]; - Adjuster* correctionch[9]; - Adjuster* rescon; - Adjuster* resconH; - Adjuster* reschro; - Adjuster* tmrs; - Adjuster* gamma; - Adjuster* sup; - Adjuster* sky; - Adjuster* thres; - Adjuster* chroma; - Adjuster* chro; - Adjuster* contrast; - Adjuster* thr; - Adjuster* thrH; - Adjuster* skinprotect; - Adjuster* edgrad; - Adjuster* edgval; - Adjuster* edgthresh; - Adjuster* strength; - Adjuster* balance; - Adjuster* iter; - Adjuster* greenlow; - Adjuster* bluelow; - Adjuster* greenmed; - Adjuster* bluemed; - Adjuster* greenhigh; - Adjuster* bluehigh; - - ThresholdAdjuster* hueskin; - ThresholdAdjuster* hueskin2; - ThresholdAdjuster* hllev; - ThresholdAdjuster* bllev; - ThresholdAdjuster* pastlev; - ThresholdAdjuster* satlev; - ThresholdAdjuster* edgcont; - ThresholdAdjuster* level0noise; - ThresholdAdjuster* level1noise; - ThresholdAdjuster* level2noise; - ThresholdAdjuster* level3noise; - - Adjuster* threshold; - Adjuster* threshold2; - Adjuster* edgedetect; - Adjuster* edgedetectthr; - Adjuster* edgedetectthr2; - Adjuster* edgesensi; - Adjuster* edgeampli; - MyComboBoxText* Lmethod; - sigc::connection Lmethodconn; - MyComboBoxText* CHmethod; - sigc::connection CHmethodconn; - MyComboBoxText* CHSLmethod; - sigc::connection CHSLmethodconn; - MyComboBoxText* EDmethod; - sigc::connection EDmethodconn; - MyComboBoxText* BAmethod; - sigc::connection BAmethodconn; - MyComboBoxText* NPmethod; - sigc::connection NPmethodconn; - MyComboBoxText* TMmethod; - sigc::connection TMmethodconn; - MyComboBoxText* HSmethod; - sigc::connection HSmethodconn; - MyComboBoxText* CLmethod; - sigc::connection CLmethodconn; - MyComboBoxText* Backmethod; - sigc::connection Backmethodconn; - MyComboBoxText* Tilesmethod; - sigc::connection Tilesmethodconn; - MyComboBoxText* daubcoeffmethod; - sigc::connection daubcoeffmethodconn; - MyComboBoxText* Dirmethod; - sigc::connection Dirmethodconn; - MyComboBoxText* Medgreinf; - sigc::connection MedgreinfConn; - Gtk::Frame* settingsFrame; - Gtk::Frame* toningFrame; - Gtk::Frame* residualFrame; - Gtk::Frame* dispFrame; - Gtk::Frame* levelFrame; - Gtk::Frame* chromaFrame; - Gtk::Frame* controlFrame; - Gtk::Frame* edgeFrame; - Gtk::Frame* noiseFrame; - Gtk::Frame* contrastSHFrame; - Gtk::Frame* finalFrame; - Gtk::Frame *chanMixerHLFrame; - Gtk::Frame *chanMixerMidFrame; - Gtk::Frame *chanMixerShadowsFrame; - Gtk::Frame *dFrame; - - Gtk::Label* colLabel; - Gtk::Label* interLabel; - Gtk::Label* wavLabels; - Gtk::Label* hsmethodLabel; - Gtk::Label* daubcoeffLabel; - Gtk::Label* ColorBalanceLabel; - Gtk::Label* labmC; - Gtk::Label* labmch; - Gtk::Label* labmED; - Gtk::Label* labmTM; - Gtk::Label* labmBA; - Gtk::Label* labmNP; - Gtk::Label* labmedgr; - Gtk::Label* labmednois; - MyExpander* expchroma; - MyExpander* expcontrast; - MyExpander* expedge; - MyExpander* expfinal; - MyExpander* expgamut; - MyExpander* expnoise; - MyExpander* expresid; - MyExpander* expsettings; - MyExpander* exptoning; - Gtk::HBox* ctboxCB; - Gtk::HBox* ctboxCH; - Gtk::HBox* ctboxED; - Gtk::HBox* ctboxTM; - Gtk::HBox* hbresid; - Gtk::HBox* backgroundHBox; - Gtk::HBox* daubcoeffHBox; - Gtk::HBox* hsmethodHBox; - Gtk::HBox* levdirMainHBox; - Gtk::HBox* levdirSubHBox; - Gtk::HBox* tilesizeHBox; - - Gtk::HBox* ctboxFI; - Gtk::HBox* ctboxNP; - Gtk::HBox* ctboxch; - Gtk::HBox* edbox; - Gtk::HBox* ednoisbox; - Gtk::HBox* eddebox; - Gtk::VBox* settingsVBox; - Gtk::VBox* contrastSHVBox; - Gtk::Label* tilesizeLabel; - Gtk::Label* levdirMainLabel; - Gtk::Label* backgroundLabel; - Gtk::Button* neutral; - Gtk::HBox* neutrHBox; - - sigc::connection enableChromaConn, enableContrastConn, enableEdgeConn, enableFinalConn; - sigc::connection enableNoiseConn, enableResidConn, enableToningConn; - sigc::connection expConn, medianConn, avoidConn, tmrConn, medianlevConn, linkedgConn, lipstConn, cbenabConn, neutralconn; - sigc::connection neutralPressedConn; - sigc::connection contrastPlusPressedConn; - sigc::connection contrastMinusPressedConn; - sigc::connection neutralchPressedConn; - - bool lastdisplay, lastdisplaygam, lastdisplayres, lastdisplaychro, lastdisplaylevel, lastmedian, lastmedianlev, lastlinkedg, lastavoid, lastlipst, lasttmr, lastcbenab; - int nextnlevel; - double tr; - double br; - double tl; - double bl; - public: Wavelet (); virtual ~Wavelet (); @@ -242,16 +48,15 @@ public: void adjusterChanged2 (ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR); void autoOpenCurve (); void curveChanged (CurveEditor* ce); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); void setAdjusterBehavior (bool multiplieradd, bool thresholdadd, bool threshold2add, bool thresadd, bool chroadd, bool chromaadd, bool contrastadd, bool skinadd, bool reschroadd, bool tmrsadd, bool resconadd, bool resconHadd, bool thradd, bool thrHadd, bool skyadd, bool edgradadd, bool edgvaladd, bool strengthadd, bool gammaadd, bool edgedetectadd, bool edgedetectthradd, bool edgedetectthr2add); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setEditProvider (EditDataProvider *provider); void updateToolState (std::vector &tpOpen); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void writeOptions (std::vector &tpOpen); - private: void foldAllButMe (GdkEventButton* event, MyExpander *expander); @@ -306,8 +111,141 @@ private: void cbenabUpdateUI (); void lipstUpdateUI (); - void enableToggled(MyExpander *expander); -}; -#endif + CurveEditorGroup* const curveEditorG; + + CurveEditorGroup* const CCWcurveEditorG; + CurveEditorGroup* const curveEditorRES; + CurveEditorGroup* const curveEditorGAM; + Gtk::HSeparator* const separatorNeutral; + Gtk::HSeparator* const separatoredge; + + CurveEditorGroup* const opaCurveEditorG; + FlatCurveEditor* opacityShapeRG; + CurveEditorGroup* const opacityCurveEditorG; + FlatCurveEditor* opacityShapeBY; + CurveEditorGroup* const opacityCurveEditorW; + CurveEditorGroup* const opacityCurveEditorWL; + FlatCurveEditor* opacityShape; + FlatCurveEditor* opacityShapeWL; + FlatCurveEditor* hhshape; + FlatCurveEditor* Chshape; + DiagonalCurveEditor* clshape; + + FlatCurveEditor* ccshape; + Gtk::CheckButton* const median; + Gtk::CheckButton* const medianlev; + Gtk::CheckButton* const linkedg; + Gtk::CheckButton* const cbenab; + Gtk::CheckButton* const lipst; + Gtk::CheckButton* const avoid; + Gtk::CheckButton* const tmr; + + Gtk::Button* const neutralchButton; + Adjuster* correction[9]; + Adjuster* correctionch[9]; + Adjuster* const rescon; + Adjuster* const resconH; + Adjuster* const reschro; + Adjuster* const tmrs; + Adjuster* const gamma; + Adjuster* const sup; + Adjuster* const sky; + Adjuster* const thres; + Adjuster* const chroma; + Adjuster* const chro; + Adjuster* const contrast; + Adjuster* const thr; + Adjuster* const thrH; + Adjuster* const skinprotect; + Adjuster* const edgrad; + Adjuster* const edgval; + Adjuster* const edgthresh; + Adjuster* const strength; + Adjuster* const balance; + Adjuster* const iter; + Adjuster* greenlow; + Adjuster* bluelow; + Adjuster* greenmed; + Adjuster* bluemed; + Adjuster* greenhigh; + Adjuster* bluehigh; + + ThresholdAdjuster* const hueskin; + ThresholdAdjuster* const hueskin2; + ThresholdAdjuster* const hllev; + ThresholdAdjuster* const bllev; + ThresholdAdjuster* const pastlev; + ThresholdAdjuster* const satlev; + ThresholdAdjuster* const edgcont; + ThresholdAdjuster* const level0noise; + ThresholdAdjuster* const level1noise; + ThresholdAdjuster* const level2noise; + ThresholdAdjuster* const level3noise; + + Adjuster* const threshold; + Adjuster* const threshold2; + Adjuster* const edgedetect; + Adjuster* const edgedetectthr; + Adjuster* const edgedetectthr2; + Adjuster* const edgesensi; + Adjuster* const edgeampli; + MyComboBoxText* const Lmethod; + sigc::connection Lmethodconn; + MyComboBoxText* const CHmethod; + sigc::connection CHmethodconn; + MyComboBoxText* const CHSLmethod; + sigc::connection CHSLmethodconn; + MyComboBoxText* const EDmethod; + sigc::connection EDmethodconn; + MyComboBoxText* const BAmethod; + sigc::connection BAmethodconn; + MyComboBoxText* const NPmethod; + sigc::connection NPmethodconn; + MyComboBoxText* const TMmethod; + sigc::connection TMmethodconn; + MyComboBoxText* const HSmethod; + sigc::connection HSmethodconn; + MyComboBoxText* const CLmethod; + sigc::connection CLmethodconn; + MyComboBoxText* const Backmethod; + sigc::connection Backmethodconn; + MyComboBoxText* const Tilesmethod; + sigc::connection Tilesmethodconn; + MyComboBoxText* const daubcoeffmethod; + sigc::connection daubcoeffmethodconn; + MyComboBoxText* const Dirmethod; + sigc::connection Dirmethodconn; + MyComboBoxText* const Medgreinf; + sigc::connection MedgreinfConn; + Gtk::Frame* const chanMixerHLFrame; + Gtk::Frame* const chanMixerMidFrame; + Gtk::Frame* const chanMixerShadowsFrame; + + Gtk::Label* const wavLabels; + Gtk::Label* const labmC; + Gtk::Label* const labmNP; + MyExpander* const expchroma; + MyExpander* const expcontrast; + MyExpander* const expedge; + MyExpander* const expfinal; + MyExpander* const expgamut; + MyExpander* const expnoise; + MyExpander* const expresid; + MyExpander* const expsettings; + MyExpander* const exptoning; + + Gtk::HBox* const neutrHBox; + + sigc::connection enableChromaConn, enableContrastConn, enableEdgeConn, enableFinalConn; + sigc::connection enableNoiseConn, enableResidConn, enableToningConn; + sigc::connection medianConn, avoidConn, tmrConn, medianlevConn, linkedgConn, lipstConn, cbenabConn, neutralconn; + sigc::connection neutralPressedConn; + sigc::connection contrastPlusPressedConn; + sigc::connection contrastMinusPressedConn; + sigc::connection neutralchPressedConn; + + bool lastmedian, lastmedianlev, lastlinkedg, lastavoid, lastlipst, lasttmr, lastcbenab; + int nextnlevel; +}; diff --git a/rtgui/whitebalance.cc b/rtgui/whitebalance.cc index f77ce74e7..e000e6738 100644 --- a/rtgui/whitebalance.cc +++ b/rtgui/whitebalance.cc @@ -104,14 +104,13 @@ static double wbTemp2Slider(double temp) const double slope = (double)(CENTERTEMP - MINTEMP) / (MAXTEMP - CENTERTEMP); const double y = (temp - CENTERTEMP) / (MAXTEMP - CENTERTEMP); double x = pow(y, 0.25); // rough guess of x, will be a little lower - double y1; double k = 0.1; bool add = true; // the y=f(x) function is a mess to invert, therefore we have this trial-refinement loop instead. // from tests, worst case is about 20 iterations, ie no problem for (;;) { - y1 = x * slope + (1.0 - slope) * pow(x, 4.0); + double y1 = x * slope + (1.0 - slope) * pow(x, 4.0); if (5000 * fabs(y1 - y) < 0.1) { break; @@ -148,10 +147,11 @@ static double wbTemp2Slider(double temp) return sval; } -WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WBALANCE_LABEL")), wbp(NULL), wblistener(NULL) +WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WBALANCE_LABEL")), wbp(nullptr), wblistener(nullptr) { Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox ()); + hbox->set_spacing(4); hbox->show (); Gtk::Label* lab = Gtk::manage (new Gtk::Label (M("TP_WBALANCE_METHOD"))); lab->show (); @@ -239,14 +239,19 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB method->pack_start(methodColumns.colIcon, false); method->pack_start(methodColumns.colLabel, true); + std::vector cells = method->get_cells(); + Gtk::CellRendererText* cellRenderer = dynamic_cast(cells.at(1)); + cellRenderer->property_ellipsize() = Pango::ELLIPSIZE_MIDDLE; + method->set_active (0); // Camera method->show (); - hbox->pack_start (*lab, Gtk::PACK_SHRINK, 4); + hbox->pack_start (*lab, Gtk::PACK_SHRINK, 0); hbox->pack_start (*method); - pack_start (*hbox, Gtk::PACK_SHRINK, 4); + pack_start (*hbox, Gtk::PACK_SHRINK, 0); opt = 0; Gtk::HBox* spotbox = Gtk::manage (new Gtk::HBox ()); + spotbox->set_spacing(4); spotbox->show (); spotbutton = Gtk::manage (new Gtk::Button (M("TP_WBALANCE_SPOTWB"))); @@ -292,10 +297,10 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB spotsize->set_active(4); } - spotbox->pack_end (*spotsize, Gtk::PACK_EXPAND_WIDGET, 4); - spotbox->pack_end (*slab, Gtk::PACK_SHRINK, 4); + spotbox->pack_end (*spotsize, Gtk::PACK_EXPAND_WIDGET, 0); + spotbox->pack_end (*slab, Gtk::PACK_SHRINK, 0); - pack_start (*spotbox, Gtk::PACK_SHRINK, 4); + pack_start (*spotbox, Gtk::PACK_SHRINK, 0); Gtk::Image* itempL = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); Gtk::Image* itempR = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); @@ -834,7 +839,7 @@ WBEntry* WhiteBalance::findWBEntry (Glib::ustring label, enum WB_LabelType lblTy } } - return NULL; + return nullptr; } int WhiteBalance::_setActiveMethod(Glib::ustring &label, Gtk::TreeModel::Children &children) diff --git a/rtgui/whitebalance.h b/rtgui/whitebalance.h index 3ebd503bc..8a34f83da 100644 --- a/rtgui/whitebalance.h +++ b/rtgui/whitebalance.h @@ -94,9 +94,9 @@ public: static void init (); static void cleanup (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void optChanged (); diff --git a/rtgui/windirmonitor.h b/rtgui/windirmonitor.h index c3278c931..b9be67a5a 100644 --- a/rtgui/windirmonitor.h +++ b/rtgui/windirmonitor.h @@ -24,8 +24,9 @@ class WinDirChangeListener { - public: + virtual ~WinDirChangeListener() = default; + virtual void winDirChanged () {} }; diff --git a/rtgui/xtransprocess.h b/rtgui/xtransprocess.h index eebec2f85..44ed2e670 100644 --- a/rtgui/xtransprocess.h +++ b/rtgui/xtransprocess.h @@ -40,10 +40,10 @@ public: XTransProcess (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void methodChanged (); void adjusterChanged (Adjuster* a, double newval); diff --git a/rtgui/xtransrawexposure.h b/rtgui/xtransrawexposure.h index 1a92146d3..4ed046a07 100644 --- a/rtgui/xtransrawexposure.h +++ b/rtgui/xtransrawexposure.h @@ -38,10 +38,10 @@ public: XTransRAWExposure (); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = NULL); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = NULL); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = NULL); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void adjusterChanged (Adjuster* a, double newval); void setAdjusterBehavior (bool pexblackadd); void trimValues (rtengine::procparams::ProcParams* pp); diff --git a/rtgui/zoompanel.h b/rtgui/zoompanel.h index aa4d9177f..bcfbc2b34 100644 --- a/rtgui/zoompanel.h +++ b/rtgui/zoompanel.h @@ -38,7 +38,7 @@ protected: public: - ZoomPanel (ImageArea* iarea); + explicit ZoomPanel (ImageArea* iarea); void zoomInClicked (); void zoomOutClicked (); diff --git a/tools/color_management.svg b/tools/color_management.svg new file mode 100644 index 000000000..d60fcefd3 --- /dev/null +++ b/tools/color_management.svg @@ -0,0 +1,655 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + Output ICC profile & intent + + + Monitor ICC profile & intent + + + Monitor + + + + Printer + + + + Output file + + + Soft-proofing path(Output Black Point Compensation) + Only ifoptions.rtSettings.HistogramWorking = 1(Output Black Point Compensation) + + + L*a*b image + End of pipeline + + Normal path(Monitor Black Point Compensation) + + Used fo image analysis only withoptions.rtSettings.HistogramWorking = 1 + Used fo image analysis withoptions.rtSettings.HistogramWorking = 0 + + Working space profile (output intent) + "Working" image + Output image * + Preview image + + * When options.rtSettings.HistogramWorking = 1 and soft-proofing is enabled, the Output image does not really exist, i.e. no memory is allocated, the CMM only makes a double conversion of each pixel of the Lab image + + diff --git a/tools/source_icons/scalable/colorPickers-hide.file b/tools/source_icons/scalable/colorPickers-hide.file new file mode 100644 index 000000000..728529716 --- /dev/null +++ b/tools/source_icons/scalable/colorPickers-hide.file @@ -0,0 +1 @@ +colorPickers-hide.png,w22,actions diff --git a/tools/source_icons/scalable/colorPickers-hide.svg b/tools/source_icons/scalable/colorPickers-hide.svg new file mode 100644 index 000000000..fe0c7bf14 --- /dev/null +++ b/tools/source_icons/scalable/colorPickers-hide.svg @@ -0,0 +1,4301 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/tools/source_icons/scalable/colorPickers-show.file b/tools/source_icons/scalable/colorPickers-show.file new file mode 100644 index 000000000..96db803fc --- /dev/null +++ b/tools/source_icons/scalable/colorPickers-show.file @@ -0,0 +1 @@ +colorPickers-show.png,w22,actions diff --git a/tools/source_icons/scalable/colorPickers-show.svg b/tools/source_icons/scalable/colorPickers-show.svg new file mode 100644 index 000000000..d03472020 --- /dev/null +++ b/tools/source_icons/scalable/colorPickers-show.svg @@ -0,0 +1,4372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/source_icons/scalable/gtk-color-picker-add.file b/tools/source_icons/scalable/gtk-color-picker-add.file new file mode 100644 index 000000000..f51e051bd --- /dev/null +++ b/tools/source_icons/scalable/gtk-color-picker-add.file @@ -0,0 +1 @@ +gtk-color-picker-add.png,w22,actions diff --git a/tools/source_icons/scalable/gtk-color-picker-add.svg b/tools/source_icons/scalable/gtk-color-picker-add.svg new file mode 100644 index 000000000..a12197ffe --- /dev/null +++ b/tools/source_icons/scalable/gtk-color-picker-add.svg @@ -0,0 +1,4839 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/source_icons/scalable/spGamutCheck.file b/tools/source_icons/scalable/spGamutCheck.file new file mode 100644 index 000000000..f8b0d6338 --- /dev/null +++ b/tools/source_icons/scalable/spGamutCheck.file @@ -0,0 +1 @@ +spGamutCheck.png,w22,actions diff --git a/tools/source_icons/scalable/spGamutCheck.svg b/tools/source_icons/scalable/spGamutCheck.svg new file mode 100644 index 000000000..9748e3916 --- /dev/null +++ b/tools/source_icons/scalable/spGamutCheck.svg @@ -0,0 +1,1344 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + ! + diff --git a/tools/source_icons/scalable/unchanged.file b/tools/source_icons/scalable/unchanged.file new file mode 100644 index 000000000..bfeb052cd --- /dev/null +++ b/tools/source_icons/scalable/unchanged.file @@ -0,0 +1,2 @@ +unchanged-22.png,w22,actions +unchanged-18.png,w18,actions diff --git a/tools/source_icons/scalable/unchanged.svg b/tools/source_icons/scalable/unchanged.svg new file mode 100644 index 000000000..f0178a78a --- /dev/null +++ b/tools/source_icons/scalable/unchanged.svg @@ -0,0 +1,1357 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + diff --git a/tools/win/InnoSetup/WindowsInnoSetup.iss.in b/tools/win/InnoSetup/WindowsInnoSetup.iss.in index 5c4a2a239..1ba02590d 100644 --- a/tools/win/InnoSetup/WindowsInnoSetup.iss.in +++ b/tools/win/InnoSetup/WindowsInnoSetup.iss.in @@ -54,7 +54,7 @@ AllowNoIcons=yes LicenseFile={#MyBuildBasePath}\LICENSE.txt OutputDir={#MyBuildBasePath}\..\ OutputBaseFilename={#MyAppName}_{#MySystemName}_{#MyBitDepth}_{#MyAppFullVersion} -SetupIconFile={#MySourceBasePath}\rtgui\RT.ico +SetupIconFile={#MySourceBasePath}\rtdata\icons\RT.ico WizardImageFile={#MySourceBasePath}\tools\win\InnoSetup\installerStrip.bmp WizardImageBackColor=$2A2A2A Compression=lzma