diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..bab7397a6 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,69 @@ +name: macOS build + +on: + push + +jobs: + build: + + runs-on: macos-latest + + steps: + - uses: actions/checkout@v1 + - name: Install dependencies + run: brew install gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++ little-cms2 libiptcdata fftw lensfun llvm expat pkgconfig libomp shared-mime-info + - name: patch libiconv + run: | + mkdir libiconv && cd libiconv + wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz + tar xf libiconv-1.16.tar.gz + cd libiconv-1.16 + patch -p1 < "${GITHUB_WORKSPACE}/tools/osx/libiconv_1.16_rt.patch" + mkdir build && cd build + destDir="$(pwd)" + ../configure --prefix=/opt/local --disable-static 'CFLAGS=-arch x86_64 -mmacosx-version-min=10.9' 'LDFLAGS=-arch x86_64 -mmacosx-version-min=10.9' CXXFLAGS="-arch x86_64 -mmacosx-version-min=10.9" + make --jobs + make DESTDIR="${destDir}" install + sudo mv opt/local /usr/local/opt/libiconv + - name: cmake + env: + CMAKE_CXX_STANDARD: 11 + PKG_CONFIG_PATH: /usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/expat/lib/pkgconfig + RAW_THERAPEE_MAJOR: '5' + RAW_THERAPEE_MINOR: '7' + C_FLAGS: -Xpreprocessor -fopenmp /usr/local/lib/libomp.dylib -I/usr/local/include -I/usr/local/opt/gdk-pixbuf/include -I/usr/local/opt/libiconv/include -I/usr/local/opt/libxml2/include -I/usr/local/opt/expat/include -I/usr/local/opt/llvm/include + run: | + # GITHUB_REF is the ref that triggered the build, like refs/heads/new-feature - the next line parses that to REF: the branch name only (new-feature) + REF=${GITHUB_REF##*/} + mkdir build && cd build + cmake \ + -DCMAKE_BUILD_TYPE="release" \ + -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ + -DCMAKE_EXE_LINKER_FLAGS="-L/usr/local/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -L/usr/local/opt/gdk-pixbuf/lib -L/usr/local/opt/libiconv/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/expat/lib" \ + -DCACHE_NAME_SUFFIX="${RAW_THERAPEE_MAJOR}.${RAW_THERAPEE_MINOR}-${REF}" \ + -DPROC_TARGET_NUMBER="2" \ + -DPROC_LABEL="generic processor" \ + -DWITH_LTO="OFF" \ + -DLENSFUNDBDIR="./share/lensfun" \ + -DOpenMP_C_FLAGS=-fopenmp=libomp \ + -DOpenMP_CXX_FLAGS=-fopenmp=libomp \ + -DOpenMP_C_LIB_NAMES="libomp" \ + -DOpenMP_CXX_LIB_NAMES="libomp" \ + -DOpenMP_libomp_LIBRARY="/usr/local/lib/libomp.dylib" \ + -DOpenMP_C_FLAGS="${C_FLAGS}" \ + -DOpenMP_CXX_FLAGS="${C_FLAGS}" \ + -DCMAKE_AR="/usr/local/opt/llvm/bin/llvm-ar" \ + -DCMAKE_RANLIB="/usr/local/opt/llvm/bin/llvm-ranlib" \ + .. + make --jobs + make install + sudo make macosx_bundle + ARTIFACT=(RawTherapee*.zip) + echo "=== artifact: ${ARTIFACT}" + # defining environment variables for next step as per https://github.com/actions/starter-workflows/issues/68 + echo "::set-env name=ARTIFACT_PATH::${GITHUB_WORKSPACE}/build/${ARTIFACT}" + echo "::set-env name=ARTIFACT_FILE::${ARTIFACT}" + - uses: actions/upload-artifact@v1 + with: + name: ${{env.ARTIFACT_FILE}} + path: ${{env.ARTIFACT_PATH}} diff --git a/rtdata/images/svg/questionmark.svg b/rtdata/images/svg/questionmark.svg new file mode 100644 index 000000000..4c4b59590 --- /dev/null +++ b/rtdata/images/svg/questionmark.svg @@ -0,0 +1,122 @@ + + + + + + + + + + + + image/svg+xml + + + + + Maciej Dworak + + + + + + + + RawTherapee icon. + + + + + + + + + + + + + + ? + + + + diff --git a/rtdata/languages/Catala b/rtdata/languages/Catala index 36666a533..31614c7b3 100644 --- a/rtdata/languages/Catala +++ b/rtdata/languages/Catala @@ -977,6 +977,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !GENERAL_AUTO;Automatic !GENERAL_CLOSE;Close !GENERAL_CURRENT;Current +!GENERAL_HELP;Help !GENERAL_OPEN;Open !GENERAL_RESET;Reset !GENERAL_SAVE_AS;Save as... diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified) index 89a4dd9b4..5be2958e8 100644 --- a/rtdata/languages/Chinese (Simplified) +++ b/rtdata/languages/Chinese (Simplified) @@ -973,6 +973,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !FILEBROWSER_SHOWUNCOLORHINT;Show images without a color label.\nShortcut: Alt-0 !FILEBROWSER_UNRANK_TOOLTIP;Unrank.\nShortcut: Shift-0 !GENERAL_CURRENT;Current +!GENERAL_HELP;Help !GENERAL_RESET;Reset !GENERAL_SAVE_AS;Save as... !GENERAL_SLIDER;Slider diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index 0ce34e3ee..25bcf2820 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -2323,6 +2323,7 @@ ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - !FILEBROWSER_POPUPREMOVE;Delete permanently !FILEBROWSER_POPUPREMOVEINCLPROC;Delete permanently, including queue-processed version !FILEBROWSER_SHOWNOTTRASHHINT;Show only images not in trash. +!GENERAL_HELP;Help !HISTORY_MSG_494;Capture Sharpening !HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only !HISTORY_MSG_FILMNEGATIVE_ENABLED;Film Negative diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index 9122d5984..592801054 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -2390,5 +2390,6 @@ ZOOMPANEL_ZOOMOUT;Herauszoomen\nTaste: - ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! +!GENERAL_HELP;Help !HISTORY_MSG_PDSHARPEN_CHECKITER;CS - Auto limit iterations !TP_SHARPENING_ITERCHECK;Auto limit iterations diff --git a/rtdata/languages/English (UK) b/rtdata/languages/English (UK) index 1fc07391e..e30425b68 100644 --- a/rtdata/languages/English (UK) +++ b/rtdata/languages/English (UK) @@ -340,6 +340,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !GENERAL_ENABLE;Enable !GENERAL_ENABLED;Enabled !GENERAL_FILE;File +!GENERAL_HELP;Help !GENERAL_LANDSCAPE;Landscape !GENERAL_NA;n/a !GENERAL_NO;No diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US) index 63dff83da..a1e0050a8 100644 --- a/rtdata/languages/English (US) +++ b/rtdata/languages/English (US) @@ -226,6 +226,7 @@ !GENERAL_ENABLE;Enable !GENERAL_ENABLED;Enabled !GENERAL_FILE;File +!GENERAL_HELP;Help !GENERAL_LANDSCAPE;Landscape !GENERAL_NA;n/a !GENERAL_NO;No diff --git a/rtdata/languages/Espanol b/rtdata/languages/Espanol index 96bce0cdf..ee8b0d17d 100644 --- a/rtdata/languages/Espanol +++ b/rtdata/languages/Espanol @@ -2321,6 +2321,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nTecla de Atajo: - !FILEBROWSER_POPUPREMOVE;Delete permanently !FILEBROWSER_POPUPREMOVEINCLPROC;Delete permanently, including queue-processed version !FILEBROWSER_SHOWNOTTRASHHINT;Show only images not in trash. +!GENERAL_HELP;Help !HISTORY_MSG_494;Capture Sharpening !HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only !HISTORY_MSG_FILMNEGATIVE_ENABLED;Film Negative diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index 9d1c6a3f7..9ecf43733 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -2266,6 +2266,7 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - !FILEBROWSER_POPUPREMOVE;Delete permanently !FILEBROWSER_POPUPREMOVEINCLPROC;Delete permanently, including queue-processed version !FILEBROWSER_SHOWNOTTRASHHINT;Show only images not in trash. +!GENERAL_HELP;Help !HISTORY_MSG_494;Capture Sharpening !HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only !HISTORY_MSG_FILMNEGATIVE_ENABLED;Film Negative diff --git a/rtdata/languages/Italiano b/rtdata/languages/Italiano index db09b5d3a..0fd256d7c 100644 --- a/rtdata/languages/Italiano +++ b/rtdata/languages/Italiano @@ -1285,6 +1285,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_CURRENT;Current +!GENERAL_HELP;Help !GENERAL_OPEN;Open !GENERAL_RESET;Reset !GENERAL_SAVE_AS;Save as... diff --git a/rtdata/languages/Japanese b/rtdata/languages/Japanese index 91ef2e931..588a817f2 100644 --- a/rtdata/languages/Japanese +++ b/rtdata/languages/Japanese @@ -8,30 +8,6 @@ #08 2012-12-22 a3novy #09 2013-04-01 a3novy #10 2013-04-19 a3novy -#11 2013-09-10 firefly -#12 2013-10-28 firefly -#13 2014-01-07 firefly -#14 2014-01-15 firefly -#15 2014-02-25 firefly -#16 2014-04-07 firefly -#17 2014-04-08 firefly -#18 2014-05-16 firefly -#19 2014-07-13 firefly -#20 2014-07-24 firefly -#21 2014-09-11 firefly -#22 2014-10-21 firefly -#23 2014-11-07 firefly -#24 2014-11-18 firefly -#25 2015-01-05 firefly -#26 2015-02-17 firefly -#27 2015-02-21 firefly -#28 2015-03-03 firefly -#29 2015-04-20 firefly -#30 2015-05-01 firefly -#31 2015-05-31 firefly -#32 2015-06-13 firefly -#33 2015-07-20 firefly -#34 2015-08-12 firefly ABOUT_TAB_BUILD;バージョン ABOUT_TAB_CREDITS;クレジット @@ -49,7 +25,7 @@ CURVEEDITOR_CURVE;カーブ CURVEEDITOR_CURVES;カーブ CURVEEDITOR_CUSTOM;カスタム CURVEEDITOR_DARKS;ダーク -CURVEEDITOR_EDITPOINT_HINT;ボタンを押すと数値で入出力を編集出来ます\n\n編集したいカーブ上のポイントを右クリックします\n編集を無効にする場合はポイント以外の部分んで右クリックします +CURVEEDITOR_EDITPOINT_HINT;ボタンを押すと数値で入出力を編集出来ます\n\n編集したいカーブ上のポイントを右クリックします\n編集を無効にする場合はポイント以外の部分で右クリックします CURVEEDITOR_HIGHLIGHTS;ハイライト CURVEEDITOR_LIGHTS;ライト CURVEEDITOR_LINEAR;リニア @@ -489,8 +465,8 @@ HISTORY_MSG_205;CAM02 ホット/バッドピクセル HISTORY_MSG_206;CAT02 - 自動で順応 HISTORY_MSG_207;フリンジ低減 - 色相カーブ HISTORY_MSG_208;ブルー/レッド イコライザ -HISTORY_MSG_210;グラデーションフィルター - 角度 -HISTORY_MSG_211;グラデーションフィルター +HISTORY_MSG_210;減光フィルター - 角度 +HISTORY_MSG_211;減光フィルター HISTORY_MSG_212;ビネットフィルター - 強さ HISTORY_MSG_213;ビネットフィルター HISTORY_MSG_214;白黒 @@ -517,10 +493,10 @@ HISTORY_MSG_234;白黒 ‘後の‘カーブのタイプ HISTORY_MSG_235;白黒 チャンネルミキサー 自動 HISTORY_MSG_236;--未使用-- HISTORY_MSG_237;白黒 チャンネルミキサー -HISTORY_MSG_238;グラデーションフィルター フェザー処理 -HISTORY_MSG_239;グラデーションフィルター 強さ -HISTORY_MSG_240;グラデーションフィルター 中央 -HISTORY_MSG_241;ビネットフィルター フェザー処理 +HISTORY_MSG_238;減光フィルター フェザー +HISTORY_MSG_239;減光フィルター 強さ +HISTORY_MSG_240;減光フィルター 中央 +HISTORY_MSG_241;ビネットフィルター フェザー HISTORY_MSG_242;ビネットフィルター 形状 HISTORY_MSG_243;半径 HISTORY_MSG_244;ビネットフィルター 強さ @@ -757,6 +733,7 @@ HISTORY_MSG_490;DRC - 量 HISTORY_MSG_491;ホワイトバランス HISTORY_MSG_492;RGBカーブ HISTORY_MSG_493;L*a*b*調整 +HISTORY_MSG_494;キャプチャーシャープニング HISTORY_MSG_CLAMPOOG;色域外の色を切り取る HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - カラー補正 HISTORY_MSG_COLORTONING_LABREGION_AB;CT - 色の補正 @@ -774,6 +751,7 @@ HISTORY_MSG_COLORTONING_LABREGION_SHOWMASK;CT - マスクの表示 HISTORY_MSG_COLORTONING_LABREGION_SLOPE;CT - スロープ HISTORY_MSG_DEHAZE_DEPTH;霞除去 - 深度 HISTORY_MSG_DEHAZE_ENABLED;霞除去 +HISTORY_MSG_DEHAZE_LUMINANCE;霞除去 - 輝度のみ HISTORY_MSG_DEHAZE_SHOW_DEPTH_MAP;霞除去 - 深度マップの表示 HISTORY_MSG_DEHAZE_STRENGTH;霞除去 - 強さ HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;デュアルデモザイク - 自動しきい値 @@ -794,6 +772,13 @@ HISTORY_MSG_LOCALCONTRAST_LIGHTNESS;ローカルコントラスト - 明るい HISTORY_MSG_LOCALCONTRAST_RADIUS;ローカルコントラスト - 半径 HISTORY_MSG_METADATA_MODE;メタデータ コピーモード HISTORY_MSG_MICROCONTRAST_CONTRAST;マイクロコントラスト - コントラストのしきい値 +HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - しきい値の自動設定 +HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - シグマの自動設定 +HISTORY_MSG_PDSHARPEN_CHECKITER;CS - 繰り返しの自動制限 +HISTORY_MSG_PDSHARPEN_CONTRAST;CS - コントラストのしきい値 +HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - 繰り返し +HISTORY_MSG_PDSHARPEN_RADIUS;CS - シグマ +HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - 周辺のシグマを増やす HISTORY_MSG_PIXELSHIFT_DEMOSAIC;PS - 振れに対するデモザイクの方式 HISTORY_MSG_PREPROCESS_LINEDENOISE_DIRECTION;ラインノイズフィルタの方向 HISTORY_MSG_PREPROCESS_PDAFLINESFILTER;PDAFラインフィルタ @@ -960,8 +945,8 @@ MAIN_TOOLTIP_BACKCOLOR2;プレビューの背景色を指定します: 中間のグレー\nショートカット: 9 MAIN_TOOLTIP_BEFOREAFTERLOCK;固定 / 固定解除 - 補正前 の表示設定\n\n固定: 補正前をそのまま表示し変更されません\n複数のツールの累積効果を評価するのに役立ちます\nさらに、比較は履歴上のどこからでも行うことができます\n\n固定解除: 現在使用のツールの効果が 補正後 に表示され、その1段階前が 補正前 に表示されます MAIN_TOOLTIP_HIDEHP;左パネル 表示/非表示 (履歴含む)\nショートカット: l -MAIN_TOOLTIP_INDCLIPPEDH;ハイライト・クリッピング領域の表示\nショートカット: > -MAIN_TOOLTIP_INDCLIPPEDS;シャドウ・クリッピング領域の表示\nショートカット: < +MAIN_TOOLTIP_INDCLIPPEDH;ハイライト・クリッピング領域の表示\nショートカット: < +MAIN_TOOLTIP_INDCLIPPEDS;シャドウ・クリッピング領域の表示\nショートカット: > MAIN_TOOLTIP_PREVIEWB;ブルー チャンネル表示\nショートカット: b MAIN_TOOLTIP_PREVIEWFOCUSMASK;フォーカス・マスク表示\nショートカット: Shift-f\n\n浅い被写界深度、低ノイズ、高ズームの画像の場合は、より正確に\n\nノイズの多い画像に対しては、検出精度を向上させるため10から30%縮小して評価します\n\nフォーカス・マスクをオンにすると表示に時間が掛かります MAIN_TOOLTIP_PREVIEWG;グリーン チャンネル表示\nショートカット: g @@ -1023,7 +1008,7 @@ PARTIALPASTE_FLATFIELDBLURRADIUS;フラットフィールド ぼかし半径 PARTIALPASTE_FLATFIELDBLURTYPE;フラットフィールド ぼかしタイプ PARTIALPASTE_FLATFIELDCLIPCONTROL;フラットフィールド クリップコントロール PARTIALPASTE_FLATFIELDFILE;フラットフィールド ファイル -PARTIALPASTE_GRADIENT;グラデーションフィルター +PARTIALPASTE_GRADIENT;減光フィルター PARTIALPASTE_HSVEQUALIZER;HSV イコライザ PARTIALPASTE_ICMSETTINGS;ICM 設定 PARTIALPASTE_IMPULSEDENOISE;インパルス・ノイズ低減 @@ -1562,6 +1547,7 @@ TP_DEFRINGE_RADIUS;半径 TP_DEFRINGE_THRESHOLD;しきい値 TP_DEHAZE_DEPTH;深度 TP_DEHAZE_LABEL;霞除去 +TP_DEHAZE_LUMINANCE;輝度のみ TP_DEHAZE_SHOW_DEPTH_MAP;深度マップの表示 TP_DEHAZE_STRENGTH;強さ TP_DIRPYRDENOISE_CHROMINANCE_AMZ;自動(多分割方式) @@ -1672,9 +1658,9 @@ TP_EXPOS_BLACKPOINT_LABEL;raw ブラック・ポイント TP_EXPOS_WHITEPOINT_LABEL;raw ホワイト・ポイント TP_FILMNEGATIVE_BLUE;ブルーの比率 TP_FILMNEGATIVE_GREEN;参考指数(コントラスト) -TP_FILMNEGATIVE_GUESS_TOOLTIP;Automatically set the red and blue ratios by picking two patches which had a neutral hue (no color) in the original scene. The patches should differ in brightness. Set the white balance afterwards. +TP_FILMNEGATIVE_GUESS_TOOLTIP;原画像の中で色相がニュートラルな部分2か所をピックすることでレッドとブルーの比率を自動で設定します。明るさが異なる2か所をピックします。その後、ホワイトバランスを設定します。 TP_FILMNEGATIVE_LABEL;ネガフィルム -TP_FILMNEGATIVE_PICK;Pick neutral spots +TP_FILMNEGATIVE_PICK;ニュートラルなポイントをピック TP_FILMNEGATIVE_RED;レッドの比率 TP_FILMSIMULATION_LABEL;フィルムシミュレーション TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapeeはフィルムシミュレーション機能に使う画像をHald CLUTフォルダーの中から探すよう設計されています(プログラムに組み込むにはフォルダーが大き過ぎるため)。\n変更するには、環境設定 > 画像処理 > フィルムシミュレーションと進み\nどのフォルダーが使われているか確認します。機能を利用する場合は、Hald CLUTだけが入っているフォルダーを指定するか、 この機能を使わない場合はそのフォルダーを空にしておきます。\n\n詳しくはRawPediaを参照して下さい。\n\nフィルム画像のスキャンを止めますか? @@ -1698,9 +1684,9 @@ TP_GRADIENT_CENTER_Y;中央 Y軸 TP_GRADIENT_CENTER_Y_TOOLTIP;アンカーポイントの位置 y軸: -100=上端, 0=中央, +100=下端 TP_GRADIENT_DEGREE;角度 TP_GRADIENT_DEGREE_TOOLTIP;回転角度の度数 -TP_GRADIENT_FEATHER;フェザー処理 -TP_GRADIENT_FEATHER_TOOLTIP;対角線に対するグラデーションの幅の割合 -TP_GRADIENT_LABEL;グラデーションフィルター +TP_GRADIENT_FEATHER;フェザー +TP_GRADIENT_FEATHER_TOOLTIP;対角線に対する減光の幅の割合 +TP_GRADIENT_LABEL;減光フィルター TP_GRADIENT_STRENGTH;強さ TP_GRADIENT_STRENGTH_TOOLTIP;終点位置でのフィルターの強さ TP_HLREC_BLEND;ブレンド @@ -1817,13 +1803,14 @@ TP_METADATA_STRIP;メタデータを全て取り除く TP_METADATA_TUNNEL;変更なしでコピー TP_NEUTRAL;リセット TP_NEUTRAL_TIP;露光量補正のスライダー値をニュートラルにリセットします。\n自動露光補正の調整値ついても同様にリセットされます -TP_PCVIGNETTE_FEATHER;フェザー処理 -TP_PCVIGNETTE_FEATHER_TOOLTIP;フェザー処理: 0=四隅だけ、50=中央までの半分、100=中央まで +TP_PCVIGNETTE_FEATHER;フェザー +TP_PCVIGNETTE_FEATHER_TOOLTIP;フェザー: 0=四隅だけ、50=中央までの半分、100=中央まで TP_PCVIGNETTE_LABEL;ビネットフィルター TP_PCVIGNETTE_ROUNDNESS;フィルター形状 TP_PCVIGNETTE_ROUNDNESS_TOOLTIP;形状: 0=長方形、50=楕円形、100=円形 TP_PCVIGNETTE_STRENGTH;強さ TP_PCVIGNETTE_STRENGTH_TOOLTIP;終点位置でのフィルターの強さ(四隅) +TP_PDSHARPENING_LABEL;キャプチャーシャープニング TP_PERSPECTIVE_HORIZONTAL;水平 TP_PERSPECTIVE_LABEL;パースペクティブ TP_PERSPECTIVE_VERTICAL;垂直 @@ -2054,10 +2041,12 @@ TP_SHARPENING_EDRADIUS;半径 TP_SHARPENING_EDTOLERANCE;エッジ許容 TP_SHARPENING_HALOCONTROL;ハロ抑制 TP_SHARPENING_HCAMOUNT;適用量 +TP_SHARPENING_ITERCHECK;繰り返しの自動制限 TP_SHARPENING_LABEL;シャープニング TP_SHARPENING_METHOD;方式 TP_SHARPENING_ONLYEDGES;エッジのみシャープニング TP_SHARPENING_RADIUS;半径 +TP_SHARPENING_RADIUS_BOOST;周辺のシグマを増やす TP_SHARPENING_RLD;RL デコンボリューション TP_SHARPENING_RLD_AMOUNT;適用量 TP_SHARPENING_RLD_DAMPING;減衰 @@ -2311,6 +2300,7 @@ TP_WBALANCE_TUNGSTEN;タングステン TP_WBALANCE_WATER1;水中 1 TP_WBALANCE_WATER2;水中 2 TP_WBALANCE_WATER_HEADER;水中 +The last update by firefly 2019-12-21 ZOOMPANEL_100;(100%) ZOOMPANEL_NEWCROPWINDOW;新規ディテール ウィンドウを開く ZOOMPANEL_ZOOM100;100%にズーム\nショートカット: z @@ -2323,16 +2313,4 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! -!HISTORY_MSG_494;Capture Sharpening -!HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only -!HISTORY_MSG_PDSHARPEN_AUTO_CONTRAST;CS - Auto threshold -!HISTORY_MSG_PDSHARPEN_AUTO_RADIUS;CS - Auto radius -!HISTORY_MSG_PDSHARPEN_CHECKITER;CS - Auto limit iterations -!HISTORY_MSG_PDSHARPEN_CONTRAST;CS - Contrast threshold -!HISTORY_MSG_PDSHARPEN_ITERATIONS;CS - Iterations -!HISTORY_MSG_PDSHARPEN_RADIUS;CS - Radius -!HISTORY_MSG_PDSHARPEN_RADIUS_BOOST;CS - Corner radius boost -!TP_DEHAZE_LUMINANCE;Luminance only -!TP_PDSHARPENING_LABEL;Capture Sharpening -!TP_SHARPENING_ITERCHECK;Auto limit iterations -!TP_SHARPENING_RADIUS_BOOST;Corner radius boost +!GENERAL_HELP;Help diff --git a/rtdata/languages/Magyar b/rtdata/languages/Magyar index 43a4ae1e1..4b6f2811b 100644 --- a/rtdata/languages/Magyar +++ b/rtdata/languages/Magyar @@ -908,6 +908,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !GENERAL_AUTO;Automatic !GENERAL_CLOSE;Close !GENERAL_CURRENT;Current +!GENERAL_HELP;Help !GENERAL_OPEN;Open !GENERAL_RESET;Reset !GENERAL_SAVE_AS;Save as... diff --git a/rtdata/languages/Nederlands b/rtdata/languages/Nederlands index 07e40256f..c230323f5 100644 --- a/rtdata/languages/Nederlands +++ b/rtdata/languages/Nederlands @@ -1982,6 +1982,7 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - !FILEBROWSER_POPUPREMOVEINCLPROC;Delete permanently, including queue-processed version !FILEBROWSER_SHOWNOTTRASHHINT;Show only images not in trash. !GENERAL_CURRENT;Current +!GENERAL_HELP;Help !GENERAL_RESET;Reset !GENERAL_SAVE_AS;Save as... !GENERAL_SLIDER;Slider diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish index c923c3bad..4e5d950fc 100644 --- a/rtdata/languages/Polish +++ b/rtdata/languages/Polish @@ -1407,6 +1407,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_CURRENT;Current +!GENERAL_HELP;Help !GENERAL_OPEN;Open !GENERAL_RESET;Reset !GENERAL_SAVE_AS;Save as... diff --git a/rtdata/languages/Portugues b/rtdata/languages/Portugues index efe3214f8..789d26cd6 100644 --- a/rtdata/languages/Portugues +++ b/rtdata/languages/Portugues @@ -2264,6 +2264,7 @@ ZOOMPANEL_ZOOMOUT;Afastar\nAtalho: - !FILEBROWSER_POPUPREMOVE;Delete permanently !FILEBROWSER_POPUPREMOVEINCLPROC;Delete permanently, including queue-processed version !FILEBROWSER_SHOWNOTTRASHHINT;Show only images not in trash. +!GENERAL_HELP;Help !HISTORY_MSG_494;Capture Sharpening !HISTORY_MSG_DEHAZE_LUMINANCE;Dehaze - Luminance only !HISTORY_MSG_FILMNEGATIVE_ENABLED;Film Negative diff --git a/rtdata/languages/Portugues (Brasil) b/rtdata/languages/Portugues (Brasil) index e6adf3bc4..d619356a9 100644 --- a/rtdata/languages/Portugues (Brasil) +++ b/rtdata/languages/Portugues (Brasil) @@ -2269,6 +2269,7 @@ ZOOMPANEL_ZOOMOUT;Menos Zoom\nAtalho: - !!!!!!!!!!!!!!!!!!!!!!!!! !FILEBROWSER_BROWSEPATHBUTTONHINT;Click to open specified path, reload folder and apply "find" keywords. +!GENERAL_HELP;Help !HISTORY_MSG_494;Capture Sharpening !HISTORY_MSG_COLORTONING_LABREGION_OFFSET;CT - region offset !HISTORY_MSG_COLORTONING_LABREGION_POWER;CT - region power diff --git a/rtdata/languages/Russian b/rtdata/languages/Russian index a4e501a77..4246ecbb6 100644 --- a/rtdata/languages/Russian +++ b/rtdata/languages/Russian @@ -1475,6 +1475,7 @@ ZOOMPANEL_ZOOMOUT;Отдалить\nГорячая клавиша: - !FILEBROWSER_SHOWORIGINALHINT;Show only original images.\n\nWhen several images exist with the same filename but different extensions, the one considered original is the one whose extension is nearest the top of the parsed extensions list in Preferences > File Browser > Parsed Extensions. !FILECHOOSER_FILTER_PP;Processing profiles !FILECHOOSER_FILTER_SAME;Same format as current photo +!GENERAL_HELP;Help !GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_MODE;Toggle between linear, log-linear and log-log scaling of the histogram. !HISTORY_MSG_235;B&W - CM - Auto diff --git a/rtdata/languages/Serbian (Cyrilic Characters) b/rtdata/languages/Serbian (Cyrilic Characters) index 9ec7c998b..7fd0ca378 100644 --- a/rtdata/languages/Serbian (Cyrilic Characters) +++ b/rtdata/languages/Serbian (Cyrilic Characters) @@ -1257,6 +1257,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_CURRENT;Current +!GENERAL_HELP;Help !GENERAL_OPEN;Open !GENERAL_RESET;Reset !GENERAL_SAVE_AS;Save as... diff --git a/rtdata/languages/Slovenian b/rtdata/languages/Slovenian index b015cb6f1..0afaa83e9 100644 --- a/rtdata/languages/Slovenian +++ b/rtdata/languages/Slovenian @@ -2306,5 +2306,6 @@ ZOOMPANEL_ZOOMOUT;Zoom Out\nBližnjica: - ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! +!GENERAL_HELP;Help !HISTORY_MSG_PDSHARPEN_CHECKITER;CS - Auto limit iterations !TP_SHARPENING_ITERCHECK;Auto limit iterations diff --git a/rtdata/languages/Swedish b/rtdata/languages/Swedish index 7861f2276..6dbea54d8 100644 --- a/rtdata/languages/Swedish +++ b/rtdata/languages/Swedish @@ -1772,6 +1772,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SHOWNOTTRASHHINT;Show only images not in trash. !GENERAL_CURRENT;Current +!GENERAL_HELP;Help !GENERAL_RESET;Reset !GENERAL_SAVE_AS;Save as... !GENERAL_SLIDER;Slider diff --git a/rtdata/languages/default b/rtdata/languages/default index 5fa474dd6..bad333054 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -225,6 +225,7 @@ GENERAL_DISABLED;Disabled GENERAL_ENABLE;Enable GENERAL_ENABLED;Enabled GENERAL_FILE;File +GENERAL_HELP;Help GENERAL_LANDSCAPE;Landscape GENERAL_NA;n/a GENERAL_NO;No diff --git a/rtengine/cJSON.h b/rtengine/cJSON.h index 786dd2e0e..49fd67b72 100644 --- a/rtengine/cJSON.h +++ b/rtengine/cJSON.h @@ -195,7 +195,7 @@ CJSON_PUBLIC(cJSON *) cJSON_CreateObject(void); /* Create a string where valuestring references a string so * it will not be freed by cJSON_Delete */ CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string); -/* Create an object/arrray that only references it's elements so +/* Create an object/array that only references it's elements so * they will not be freed by cJSON_Delete */ CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child); CJSON_PUBLIC(cJSON *) cJSON_CreateArrayReference(const cJSON *child); diff --git a/rtengine/camconst.cc b/rtengine/camconst.cc index e8f7b1cbf..d136d6a21 100644 --- a/rtengine/camconst.cc +++ b/rtengine/camconst.cc @@ -253,7 +253,7 @@ CameraConst::parseEntry(void *cJSON_, const char *make_model) } if (i % 4 != 0) { - fprintf(stderr, "\"masked_areas\" array length must be divisable by 4\n"); + fprintf(stderr, "\"masked_areas\" array length must be divisible by 4\n"); goto parse_error; } } diff --git a/rtengine/camconst.json b/rtengine/camconst.json index a3bab58a8..ab42f3d19 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -1323,6 +1323,11 @@ Camera constants: "ranges": { "white": 16100 } }, + { // Quality C, bisected from the overexposed region of one pre-release sample file + "make_model": "FUJIFILM X-A7", + "ranges": { "white": 16382 } + }, + { // Quality B "make_model": "FUJIFILM X-A10", "dcraw_matrix": [ 11540,-4999,-991,-2949,10963,2278,-382,1049,5605 ], // DNGv9.12 D65 diff --git a/rtengine/capturesharpening.cc b/rtengine/capturesharpening.cc index 281a2ad71..e5bfde555 100644 --- a/rtengine/capturesharpening.cc +++ b/rtengine/capturesharpening.cc @@ -152,7 +152,7 @@ inline void gauss5x5div (float** RESTRICT src, float** RESTRICT dst, float** RES for (int i = 2; i < tileSize - 2; ++i) { // I tried hand written SSE code but gcc vectorizes better for (int j = 2; j < tileSize - 2; ++j) { - const float val = c21 * (src[i - 2][j - 1] + src[i - 2][j + 1] + src[i - 1][j - 2] + src[i - 1][j + 2] + src[i + 1][j - 2] + src[i + 1][j + 2] + src[i + 2][j - 1] + src[i + 2][j + 1]) + + const float val = c21 * ((src[i - 2][j - 1] + src[i - 2][j + 1]) + (src[i - 1][j - 2] + src[i - 1][j + 2]) + (src[i + 1][j - 2] + src[i + 1][j + 2]) + (src[i + 2][j - 1] + src[i + 2][j + 1])) + c20 * (src[i - 2][j] + src[i][j - 2] + src[i][j + 2] + src[i + 2][j]) + c11 * (src[i - 1][j - 1] + src[i - 1][j + 1] + src[i + 1][j - 1] + src[i + 1][j + 1]) + c10 * (src[i - 1][j] + src[i][j - 1] + src[i][j + 1] + src[i + 1][j]) + @@ -178,10 +178,10 @@ inline void gauss7x7div(float** RESTRICT src, float** RESTRICT dst, float** REST for (int i = 3; i < tileSize - 3; ++i) { // I tried hand written SSE code but gcc vectorizes better for (int j = 3; j < tileSize - 3; ++j) { - const float val = c31 * (src[i - 3][j - 1] + src[i - 3][j + 1] + src[i - 1][j - 3] + src[i - 1][j + 3] + src[i + 1][j - 3] + src[i + 1][j + 3] + src[i + 3][j - 1] + src[i + 3][j + 1]) + + const float val = c31 * ((src[i - 3][j - 1] + src[i - 3][j + 1]) + (src[i - 1][j - 3] + src[i - 1][j + 3]) + (src[i + 1][j - 3] + src[i + 1][j + 3]) + (src[i + 3][j - 1] + src[i + 3][j + 1])) + c30 * (src[i - 3][j] + src[i][j - 3] + src[i][j + 3] + src[i + 3][j]) + c22 * (src[i - 2][j - 2] + src[i - 2][j + 2] + src[i + 2][j - 2] + src[i + 2][j + 2]) + - c21 * (src[i - 2][j - 1] + src[i - 2][j + 1] * c21 + src[i - 1][j - 2] + src[i - 1][j + 2] + src[i + 1][j - 2] + src[i + 1][j + 2] + src[i + 2][j - 1] + src[i + 2][j + 1]) + + c21 * ((src[i - 2][j - 1] + src[i - 2][j + 1]) + (src[i - 1][j - 2] + src[i - 1][j + 2]) + (src[i + 1][j - 2] + src[i + 1][j + 2]) + (src[i + 2][j - 1] + src[i + 2][j + 1])) + c20 * (src[i - 2][j] + src[i][j - 2] + src[i][j + 2] + src[i + 2][j]) + c11 * (src[i - 1][j - 1] + src[i - 1][j + 1] + src[i + 1][j - 1] + src[i + 1][j + 1]) + c10 * (src[i - 1][j] + src[i][j - 1] + src[i][j + 1] + src[i + 1][j]) + @@ -221,7 +221,7 @@ inline void gauss5x5mult (float** RESTRICT src, float** RESTRICT dst, const int for (int i = 2; i < tileSize - 2; ++i) { // I tried hand written SSE code but gcc vectorizes better for (int j = 2; j < tileSize - 2; ++j) { - const float val = c21 * (src[i - 2][j - 1] + src[i - 2][j + 1] + src[i - 1][j - 2] + src[i - 1][j + 2] + src[i + 1][j - 2] + src[i + 1][j + 2] + src[i + 2][j - 1] + src[i + 2][j + 1]) + + const float val = c21 * ((src[i - 2][j - 1] + src[i - 2][j + 1]) + (src[i - 1][j - 2] + src[i - 1][j + 2]) + (src[i + 1][j - 2] + src[i + 1][j + 2]) + (src[i + 2][j - 1] + src[i + 2][j + 1])) + c20 * (src[i - 2][j] + src[i][j - 2] + src[i][j + 2] + src[i + 2][j]) + c11 * (src[i - 1][j - 1] + src[i - 1][j + 1] + src[i + 1][j - 1] + src[i + 1][j + 1]) + c10 * (src[i - 1][j] + src[i][j - 1] + src[i][j + 1] + src[i + 1][j]) + @@ -247,10 +247,10 @@ inline void gauss7x7mult(float** RESTRICT src, float** RESTRICT dst, const int t for (int i = 3; i < tileSize - 3; ++i) { // I tried hand written SSE code but gcc vectorizes better for (int j = 3; j < tileSize - 3; ++j) { - const float val = c31 * (src[i - 3][j - 1] + src[i - 3][j + 1] + src[i - 1][j - 3] + src[i - 1][j + 3] + src[i + 1][j - 3] + src[i + 1][j + 3] + src[i + 3][j - 1] + src[i + 3][j + 1]) + + const float val = c31 * ((src[i - 3][j - 1] + src[i - 3][j + 1]) + (src[i - 1][j - 3] + src[i - 1][j + 3]) + (src[i + 1][j - 3] + src[i + 1][j + 3]) + (src[i + 3][j - 1] + src[i + 3][j + 1])) + c30 * (src[i - 3][j] + src[i][j - 3] + src[i][j + 3] + src[i + 3][j]) + c22 * (src[i - 2][j - 2] + src[i - 2][j + 2] + src[i + 2][j - 2] + src[i + 2][j + 2]) + - c21 * (src[i - 2][j - 1] + src[i - 2][j + 1] * c21 + src[i - 1][j - 2] + src[i - 1][j + 2] + src[i + 1][j - 2] + src[i + 1][j + 2] + src[i + 2][j - 1] + src[i + 2][j + 1]) + + c21 * ((src[i - 2][j - 1] + src[i - 2][j + 1]) + (src[i - 1][j - 2] + src[i - 1][j + 2]) + (src[i + 1][j - 2] + src[i + 1][j + 2]) + (src[i + 2][j - 1] + src[i + 2][j + 1])) + c20 * (src[i - 2][j] + src[i][j - 2] + src[i][j + 2] + src[i + 2][j]) + c11 * (src[i - 1][j - 1] + src[i - 1][j + 1] + src[i + 1][j - 1] + src[i + 1][j + 1]) + c10 * (src[i - 1][j] + src[i][j - 1] + src[i][j + 1] + src[i + 1][j]) + @@ -563,19 +563,25 @@ BENCHFUN // fill tiles if (endOfRow || endOfCol) { // special handling for small tiles at end of row or column + float maxVal = 0.f; if (checkIterStop) { - float maxVal = 0.f; for (int k = 0, ii = endOfCol ? H - fullTileSize + border : i; k < tileSize; ++k, ++ii) { for (int l = 0, jj = endOfRow ? W - fullTileSize + border : j; l < tileSize; ++l, ++jj) { iterCheck[k][l] = oldLuminance[ii][jj] * clipmask[ii][jj] * 0.5f; maxVal = std::max(maxVal, clipmask[ii][jj]); } } - if (maxVal < minBlend) { - // no pixel of the tile has a blend factor >= minBlend => skip the tile - continue; + } else { + for (int k = 0, ii = endOfCol ? H - fullTileSize + border : i; k < tileSize; ++k, ++ii) { + for (int l = 0, jj = endOfRow ? W - fullTileSize + border : j; l < tileSize; ++l, ++jj) { + maxVal = std::max(maxVal, clipmask[ii][jj]); + } } } + if (maxVal < minBlend) { + // no pixel of the tile has a blend factor >= minBlend => skip the tile + continue; + } for (int k = 0, ii = endOfCol ? H - fullTileSize : i - border; k < fullTileSize; ++k, ++ii) { for (int l = 0, jj = endOfRow ? W - fullTileSize : j - border; l < fullTileSize; ++l, ++jj) { tmpIThr[k][l] = oldLuminance[ii][jj]; @@ -583,19 +589,25 @@ BENCHFUN } } } else { + float maxVal = 0.f; if (checkIterStop) { - float maxVal = 0.f; for (int ii = 0; ii < tileSize; ++ii) { for (int jj = 0; jj < tileSize; ++jj) { iterCheck[ii][jj] = oldLuminance[i + ii][j + jj] * clipmask[i + ii][j + jj] * 0.5f; maxVal = std::max(maxVal, clipmask[i + ii][j + jj]); } } - if (maxVal < minBlend) { - // no pixel of the tile has a blend factor >= minBlend => skip the tile - continue; + } else { + for (int ii = 0; ii < tileSize; ++ii) { + for (int jj = 0; jj < tileSize; ++jj) { + maxVal = std::max(maxVal, clipmask[i + ii][j + jj]); + } } } + if (maxVal < minBlend) { + // no pixel of the tile has a blend factor >= minBlend => skip the tile + continue; + } for (int ii = i; ii < i + fullTileSize; ++ii) { for (int jj = j; jj < j + fullTileSize; ++jj) { tmpIThr[ii - i][jj - j] = oldLuminance[ii - border][jj - border]; @@ -788,7 +800,7 @@ BENCHFUN } array2D& blend = red; // red will be overridden anyway => we can use its buffer to store the blend mask - buildBlendMask(L, blend, W, H, contrast, 1.f, sharpeningParams.autoContrast, clipMask); + buildBlendMask(L, blend, W, H, contrast, sharpeningParams.autoContrast, clipMask); if (plistener) { plistener->setProgress(0.2); } @@ -837,7 +849,7 @@ BENCHFUN } // calculate contrast based blend factors to reduce sharpening in regions with low contrast array2D& blend = clipMask; // we can share blend and clipMask buffer here - buildBlendMask(L, blend, W, H, contrast, 1.f, sharpeningParams.autoContrast, clipMask); + buildBlendMask(L, blend, W, H, contrast, sharpeningParams.autoContrast, clipMask); if (plistener) { plistener->setProgress(0.2); } diff --git a/rtengine/color.h b/rtengine/color.h index d9c344c27..211615de1 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -1372,7 +1372,7 @@ public: * @param HH hue before [-PI ; +PI] * @param Chprov1 chroma after [0 ; 180 (can be superior)] * @param CC chroma before [0 ; 180] - * @param corectionHuechroma hue correction depending on chromaticity (saturation), in radians [0 ; 0.45] (return value) + * @param correctionHueChroma hue correction depending on chromaticity (saturation), in radians [0 ; 0.45] (return value) * @param correctlum hue correction depending on luminance (brightness, contrast,...), in radians [0 ; 0.45] (return value) * @param munsDbgInfo (Debug target only) object to collect information */ diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index d5348286c..812f122b3 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -4433,6 +4433,10 @@ void CLASS foveon_interpolate() void CLASS crop_masked_pixels() { + if (data_error) { + return; + } + int row, col; unsigned r, c, m, mblack[8], zero, val; diff --git a/rtengine/dual_demosaic_RT.cc b/rtengine/dual_demosaic_RT.cc index 69d1a189a..93508808c 100644 --- a/rtengine/dual_demosaic_RT.cc +++ b/rtengine/dual_demosaic_RT.cc @@ -105,7 +105,7 @@ void RawImageSource::dual_demosaic_RT(bool isBayer, const procparams::RAWParams JaggedArray blend(winw, winh); float contrastf = contrast / 100.f; - buildBlendMask(L, blend, winw, winh, contrastf, 1.f, autoContrast); + buildBlendMask(L, blend, winw, winh, contrastf, autoContrast); contrast = contrastf * 100.f; array2D& redTmp = L; // L is not needed anymore => reuse it diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 99fb47765..10962b7f9 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -5591,7 +5591,7 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double whiteclipg = CurveFactory::igamma2 ((float) (whiteclipg / 65535.0)) * 65535.0; //need to inverse gamma transform to get correct exposure compensation parameter - //corection with gamma + //correction with gamma black = (int) ((65535 * black) / whiteclipg); //expcomp = log(65535.0 / (whiteclipg)) / log(2.0); diff --git a/rtengine/ipsharpen.cc b/rtengine/ipsharpen.cc index a35476d3a..7198b76c5 100644 --- a/rtengine/ipsharpen.cc +++ b/rtengine/ipsharpen.cc @@ -256,7 +256,7 @@ void ImProcFunctions::sharpening (LabImage* lab, const procparams::SharpeningPar // calculate contrast based blend factors to reduce sharpening in regions with low contrast JaggedArray blend(W, H); float contrast = sharpenParam.contrast / 100.f; - buildBlendMask(lab->L, blend, W, H, contrast, 1.f); + buildBlendMask(lab->L, blend, W, H, contrast); if(showMask) { #ifdef _OPENMP diff --git a/rtengine/rawflatfield.cc b/rtengine/rawflatfield.cc index 05b3be408..cbc5e6bd6 100644 --- a/rtengine/rawflatfield.cc +++ b/rtengine/rawflatfield.cc @@ -263,10 +263,9 @@ void cfaboxblur(const float* const * riFlatFile, float* cfablur, int boxH, int b namespace rtengine { -void RawImageSource::processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, const unsigned short black[4]) +void RawImageSource::processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, const float black[4]) { // BENCHFUN - const float fblack[4] = {static_cast(black[0]), static_cast(black[1]), static_cast(black[2]), static_cast(black[3])}; std::unique_ptr cfablur(new float[H * W]); const int BS = raw.ff_BlurRadius + (raw.ff_BlurRadius & 1); @@ -292,7 +291,7 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra const int col = 2 * (W >> 2) + n; const int c = ri->get_colors() != 1 ? FC(row, col) : 0; const int c4 = ri->get_colors() != 1 ? ((c == 1 && !(row & 1)) ? 3 : c) : 0; - refcolor[m][n] = std::max(0.0f, cfablur[row * W + col] - fblack[c4]); + refcolor[m][n] = std::max(0.0f, cfablur[row * W + col] - black[c4]); } float limitFactor = 1.f; @@ -315,16 +314,16 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra clippedBefore = true; break; } - const float tempval = (rawVal - fblack[c4]) * (refcolor[m][n] / std::max(1e-5f, cfablur[(row + m) * W + col + n] - fblack[c4])); + const float tempval = (rawVal - black[c4]) * (refcolor[m][n] / std::max(1e-5f, cfablur[(row + m) * W + col + n] - black[c4])); maxval = std::max(maxval, tempval); } } // now we have the max value for the channel // if it clips, calculate factor to avoid clipping - if (maxval + fblack[c4] >= ri->get_white(c4)) { + if (maxval + black[c4] >= ri->get_white(c4)) { if (!clippedBefore) { - limitFactor = std::min(limitFactor, ri->get_white(c4) / (maxval + fblack[c4])); + limitFactor = std::min(limitFactor, ri->get_white(c4) / (maxval + black[c4])); } else { limitFactor = 1.f; } @@ -361,8 +360,8 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra const vfloat refcolorv[2] = {_mm_set_ps(refcolor[0][1], refcolor[0][0], refcolor[0][1], refcolor[0][0]), _mm_set_ps(refcolor[1][1], refcolor[1][0], refcolor[1][1], refcolor[1][0]) }; - const vfloat blackv[2] = {_mm_set_ps(fblack[c4[0][1]], fblack[c4[0][0]], fblack[c4[0][1]], fblack[c4[0][0]]), - _mm_set_ps(fblack[c4[1][1]], fblack[c4[1][0]], fblack[c4[1][1]], fblack[c4[1][0]]) + const vfloat blackv[2] = {_mm_set_ps(black[c4[0][1]], black[c4[0][0]], black[c4[0][1]], black[c4[0][0]]), + _mm_set_ps(black[c4[1][1]], black[c4[1][0]], black[c4[1][1]], black[c4[1][0]]) }; const vfloat onev = F2V(1.f); @@ -389,9 +388,9 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra #endif for (; col < W; ++col) { - const float blur = cfablur[row * W + col] - fblack[c4[row & 1][col & 1]]; + const float blur = cfablur[row * W + col] - black[c4[row & 1][col & 1]]; const float vignettecorr = blur <= minValue ? 1.f : refcolor[row & 1][col & 1] / blur; - rawData[row][col] = (rawData[row][col] - fblack[c4[row & 1][col & 1]]) * vignettecorr + fblack[c4[row & 1][col & 1]]; + rawData[row][col] = (rawData[row][col] - black[c4[row & 1][col & 1]]) * vignettecorr + black[c4[row & 1][col & 1]]; } } } else if (ri->getSensorType() == ST_FUJI_XTRANS) { @@ -404,7 +403,7 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra const int row = 2 * (H >> 2) + m; const int col = 2 * (W >> 2) + n; const int c = riFlatFile->XTRANSFC(row, col); - refcolor[c] += std::max(0.0f, cfablur[row * W + col] - fblack[c]); + refcolor[c] += std::max(0.0f, cfablur[row * W + col] - black[c]); cCount[c] ++; } @@ -430,14 +429,14 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra clippedBefore = true; break; } - const float tempval = (rawVal - fblack[0]) * (refcolor[ri->XTRANSFC(row, col)] / std::max(1e-5f, cfablur[(row) * W + col] - fblack[0])); + const float tempval = (rawVal - black[0]) * (refcolor[ri->XTRANSFC(row, col)] / std::max(1e-5f, cfablur[(row) * W + col] - black[0])); maxval = std::max(maxval, tempval); } } // there's only one white level for xtrans - if (!clippedBefore && maxval + fblack[0] > ri->get_white(0)) { - limitFactor = ri->get_white(0) / (maxval + fblack[0]); + if (!clippedBefore && maxval + black[0] > ri->get_white(0)) { + limitFactor = ri->get_white(0) / (maxval + black[0]); flatFieldAutoClipValue = (1.f - limitFactor) * 100.f; // this value can be used to set the clip control slider in gui } } else { @@ -458,9 +457,9 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra for (int row = 0; row < H; ++row) { for (int col = 0; col < W; ++col) { const int c = ri->XTRANSFC(row, col); - const float blur = cfablur[(row) * W + col] - fblack[c]; + const float blur = cfablur[(row) * W + col] - black[c]; const float vignettecorr = blur <= minValue ? 1.f : refcolor[c] / blur; - rawData[row][col] = (rawData[row][col] - fblack[c]) * vignettecorr + fblack[c]; + rawData[row][col] = (rawData[row][col] - black[c]) * vignettecorr + black[c]; } } } @@ -488,8 +487,8 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra } #ifdef __SSE2__ - const vfloat blackv[2] = {_mm_set_ps(fblack[c4[0][1]], fblack[c4[0][0]], fblack[c4[0][1]], fblack[c4[0][0]]), - _mm_set_ps(fblack[c4[1][1]], fblack[c4[1][0]], fblack[c4[1][1]], fblack[c4[1][0]]) + const vfloat blackv[2] = {_mm_set_ps(black[c4[0][1]], black[c4[0][0]], black[c4[0][1]], black[c4[0][0]]), + _mm_set_ps(black[c4[1][1]], black[c4[1][0]], black[c4[1][1]], black[c4[1][0]]) }; const vfloat epsv = F2V(1e-5f); @@ -513,9 +512,9 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra #endif for (; col < W; ++col) { - const float linecorr = SQR(std::max(1e-5f, cfablur[row * W + col] - fblack[c4[row & 1][col & 1]])) / - (std::max(1e-5f, cfablur1[row * W + col] - fblack[c4[row & 1][col & 1]]) * std::max(1e-5f, cfablur2[row * W + col] - fblack[c4[row & 1][col & 1]])); - rawData[row][col] = (rawData[row][col] - fblack[c4[row & 1][col & 1]]) * linecorr + fblack[c4[row & 1][col & 1]]; + const float linecorr = SQR(std::max(1e-5f, cfablur[row * W + col] - black[c4[row & 1][col & 1]])) / + (std::max(1e-5f, cfablur1[row * W + col] - black[c4[row & 1][col & 1]]) * std::max(1e-5f, cfablur2[row * W + col] - black[c4[row & 1][col & 1]])); + rawData[row][col] = (rawData[row][col] - black[c4[row & 1][col & 1]]) * linecorr + black[c4[row & 1][col & 1]]; } } } else if (ri->getSensorType() == ST_FUJI_XTRANS) { @@ -526,9 +525,9 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra for (int row = 0; row < H; ++row) { for (int col = 0; col < W; ++col) { const int c = ri->XTRANSFC(row, col); - const float hlinecorr = std::max(1e-5f, cfablur[(row) * W + col] - fblack[c]) / std::max(1e-5f, cfablur1[(row) * W + col] - fblack[c]); - const float vlinecorr = std::max(1e-5f, cfablur[(row) * W + col] - fblack[c]) / std::max(1e-5f, cfablur2[(row) * W + col] - fblack[c]); - rawData[row][col] = (rawData[row][col] - fblack[c]) * hlinecorr * vlinecorr + fblack[c]; + const float hlinecorr = std::max(1e-5f, cfablur[(row) * W + col] - black[c]) / std::max(1e-5f, cfablur1[(row) * W + col] - black[c]); + const float vlinecorr = std::max(1e-5f, cfablur[(row) * W + col] - black[c]) / std::max(1e-5f, cfablur2[(row) * W + col] - black[c]); + rawData[row][col] = (rawData[row][col] - black[c]) * hlinecorr * vlinecorr + black[c]; } } } diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index d00812d88..18fc18f58 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -42,7 +42,7 @@ #include "../rtgui/options.h" //#define BENCHMARK -//#include "StopWatch.h" +#include "StopWatch.h" #ifdef _OPENMP #include @@ -2397,11 +2397,10 @@ void RawImageSource::HLRecovery_Global(const ToneCurveParams &hrp) */ void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, RawImage *riDark, RawImage *riFlatFile, array2D &rawData ) { - // TODO: Change type of black[] to float to avoid conversions - unsigned short black[4] = { - (unsigned short)ri->get_cblack(0), (unsigned short)ri->get_cblack(1), - (unsigned short)ri->get_cblack(2), (unsigned short)ri->get_cblack(3) - }; + const float black[4] = { + static_cast(ri->get_cblack(0)), static_cast(ri->get_cblack(1)), + static_cast(ri->get_cblack(2)), static_cast(ri->get_cblack(3)) + }; if (ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS) { if (!rawData) { @@ -2409,11 +2408,22 @@ void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, Raw } if (riDark && W == riDark->get_width() && H == riDark->get_height()) { // This works also for xtrans-sensors, because black[0] to black[4] are equal for these + StopWatch Stop1("darkframe subtraction"); +#ifdef _OPENMP + #pragma omp parallel for +#endif for (int row = 0; row < H; row++) { - for (int col = 0; col < W; col++) { - int c = FC(row, col); - int c4 = ( c == 1 && !(row & 1) ) ? 3 : c; - rawData[row][col] = max(src->data[row][col] + black[c4] - riDark->data[row][col], 0.0f); + const int c0 = FC(row, 0); + const float black0 = black[(c0 == 1 && !(row & 1) ) ? 3 : c0]; + const int c1 = FC(row, 1); + const float black1 = black[(c1 == 1 && !(row & 1) ) ? 3 : c1]; + int col; + for (col = 0; col < W - 1; col += 2) { + rawData[row][col] = max(src->data[row][col] + black0 - riDark->data[row][col], 0.0f); + rawData[row][col + 1] = max(src->data[row][col + 1] + black1 - riDark->data[row][col + 1], 0.0f); + } + if (col < W) { + rawData[row][col] = max(src->data[row][col] + black0 - riDark->data[row][col], 0.0f); } } } else { diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h index 28cf30010..bd460c61b 100644 --- a/rtengine/rawimagesource.h +++ b/rtengine/rawimagesource.h @@ -136,7 +136,7 @@ public: return rgbSourceModified; // tracks whether cached rgb output of demosaic has been modified } - void processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, const unsigned short black[4]); + void processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, const float black[4]); void copyOriginalPixels(const procparams::RAWParams &raw, RawImage *ri, RawImage *riDark, RawImage *riFlatFile, array2D &rawData ); void scaleColors (int winx, int winy, int winw, int winh, const procparams::RAWParams &raw, array2D &rawData); // raw for cblack diff --git a/rtengine/rt_algo.cc b/rtengine/rt_algo.cc index 79a7c3679..a5b48af95 100644 --- a/rtengine/rt_algo.cc +++ b/rtengine/rt_algo.cc @@ -299,7 +299,7 @@ void findMinMaxPercentile(const float* data, size_t size, float minPrct, float& maxOut = rtengine::LIM(maxOut, minVal, maxVal); } -void buildBlendMask(const float* const * luminance, float **blend, int W, int H, float &contrastThreshold, float amount, bool autoContrast, float ** clipMask) { +void buildBlendMask(const float* const * luminance, float **blend, int W, int H, float &contrastThreshold, bool autoContrast, float ** clipMask) { if (autoContrast) { constexpr float minLuminance = 2000.f; @@ -403,7 +403,7 @@ void buildBlendMask(const float* const * luminance, float **blend, int W, int H, if(contrastThreshold == 0.f) { for(int j = 0; j < H; ++j) { for(int i = 0; i < W; ++i) { - blend[j][i] = amount; + blend[j][i] = 1.f; } } } else { @@ -415,7 +415,6 @@ void buildBlendMask(const float* const * luminance, float **blend, int W, int H, #ifdef __SSE2__ const vfloat contrastThresholdv = F2V(contrastThreshold); const vfloat scalev = F2V(scale); - const vfloat amountv = F2V(amount); #endif #ifdef _OPENMP #pragma omp for schedule(dynamic,16) @@ -429,14 +428,14 @@ void buildBlendMask(const float* const * luminance, float **blend, int W, int H, vfloat contrastv = vsqrtf(SQRV(LVFU(luminance[j][i+1]) - LVFU(luminance[j][i-1])) + SQRV(LVFU(luminance[j+1][i]) - LVFU(luminance[j-1][i])) + SQRV(LVFU(luminance[j][i+2]) - LVFU(luminance[j][i-2])) + SQRV(LVFU(luminance[j+2][i]) - LVFU(luminance[j-2][i]))) * scalev; - STVFU(blend[j][i], LVFU(clipMask[j][i]) * amountv * calcBlendFactor(contrastv, contrastThresholdv)); + STVFU(blend[j][i], LVFU(clipMask[j][i]) * calcBlendFactor(contrastv, contrastThresholdv)); } } else { for(; i < W - 5; i += 4) { vfloat contrastv = vsqrtf(SQRV(LVFU(luminance[j][i+1]) - LVFU(luminance[j][i-1])) + SQRV(LVFU(luminance[j+1][i]) - LVFU(luminance[j-1][i])) + SQRV(LVFU(luminance[j][i+2]) - LVFU(luminance[j][i-2])) + SQRV(LVFU(luminance[j+2][i]) - LVFU(luminance[j-2][i]))) * scalev; - STVFU(blend[j][i], amountv * calcBlendFactor(contrastv, contrastThresholdv)); + STVFU(blend[j][i], calcBlendFactor(contrastv, contrastThresholdv)); } } #endif @@ -445,7 +444,7 @@ void buildBlendMask(const float* const * luminance, float **blend, int W, int H, float contrast = sqrtf(rtengine::SQR(luminance[j][i+1] - luminance[j][i-1]) + rtengine::SQR(luminance[j+1][i] - luminance[j-1][i]) + rtengine::SQR(luminance[j][i+2] - luminance[j][i-2]) + rtengine::SQR(luminance[j+2][i] - luminance[j-2][i])) * scale; - blend[j][i] = (clipMask ? clipMask[j][i] : 1.f) * amount * calcBlendFactor(contrast, contrastThreshold); + blend[j][i] = (clipMask ? clipMask[j][i] : 1.f) * calcBlendFactor(contrast, contrastThreshold); } } diff --git a/rtengine/rt_algo.h b/rtengine/rt_algo.h index 5485346c7..81147fd75 100644 --- a/rtengine/rt_algo.h +++ b/rtengine/rt_algo.h @@ -24,5 +24,5 @@ namespace rtengine { void findMinMaxPercentile(const float* data, size_t size, float minPrct, float& minOut, float maxPrct, float& maxOut, bool multiThread = true); -void buildBlendMask(const float* const * luminance, float **blend, int W, int H, float &contrastThreshold, float amount = 1.f, bool autoContrast = false, float ** clipmask = nullptr); +void buildBlendMask(const float* const * luminance, float **blend, int W, int H, float &contrastThreshold, bool autoContrast = false, float ** clipmask = nullptr); } diff --git a/rtgui/adjuster.cc b/rtgui/adjuster.cc index 2267a9fc1..142374213 100644 --- a/rtgui/adjuster.cc +++ b/rtgui/adjuster.cc @@ -230,22 +230,7 @@ void Adjuster::setDefaultEditedState (EditedState eState) void Adjuster::autoToggled () { - if (!editedCheckBox) { - // If not used in the BatchEditor panel - if (automatic->get_active()) { - // Disable the slider and spin button - spin->set_sensitive(false); - slider->set_sensitive(false); - reset->set_sensitive(false); - } else { - // Enable the slider and spin button - spin->set_sensitive(true); - slider->set_sensitive(true); - reset->set_sensitive(true); - } - } - - if (adjusterListener != nullptr && !blocked) { + if (adjusterListener && !blocked) { adjusterListener->adjusterAutoToggled(this); } } @@ -380,6 +365,9 @@ void Adjuster::spinChanged () if (adjusterListener && !blocked) { if (!buttonReleaseSlider.connected() || afterReset) { eventPending = false; + if (automatic) { + setAutoValue(false); + } adjusterListener->adjusterChanged(this, spin->get_value()); } else { eventPending = true; @@ -419,6 +407,9 @@ void Adjuster::sliderChanged () if (adjusterListener && !blocked) { if (!buttonReleaseSlider.connected() || afterReset) { eventPending = false; + if (automatic) { + setAutoValue(false); + } adjusterListener->adjusterChanged(this, spin->get_value()); } else { eventPending = true; @@ -459,21 +450,6 @@ void Adjuster::setAutoValue (bool a) const bool oldVal = autoChange.block(true); automatic->set_active(a); autoChange.block(oldVal); - - if (!editedCheckBox) { - // If not used in the BatchEditor panel - if (a) { - // Disable the slider and spin button - spin->set_sensitive(false); - slider->set_sensitive(false); - reset->set_sensitive(false); - } else { - // Enable the slider and spin button - spin->set_sensitive(true); - slider->set_sensitive(true); - reset->set_sensitive(true); - } - } } } @@ -481,6 +457,9 @@ bool Adjuster::notifyListener () { if (eventPending && adjusterListener != nullptr && !blocked) { + if (automatic) { + setAutoValue(false); + } adjusterListener->adjusterChanged(this, spin->get_value()); } @@ -571,6 +550,9 @@ void Adjuster::showEditedCB () void Adjuster::editedToggled () { if (adjusterListener && !blocked) { + if (automatic) { + setAutoValue(false); + } adjusterListener->adjusterChanged(this, spin->get_value()); } diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index b00032191..0a9b81112 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -1492,9 +1492,9 @@ void CropWindow::expose (Cairo::RefPtr cr) const float kernel_size2 = SQR(2.f * blur_radius2 + 1.f); // count of pixels in the small blur kernel const float rkernel_size2 = 1.0f / kernel_size2; // reciprocal of kernel_size to avoid divisions - // aloocate buffer for precalculated Luminance + // allocate buffer for precalculated Luminance float* tmpL = (float*)malloc(bHeight * bWidth * sizeof(float) ); - // aloocate buffers for sums and sums of squares of small kernel + // allocate buffers for sums and sums of squares of small kernel float* tmpLsum = (float*)malloc((bHeight) * (bWidth) * sizeof(float) ); float* tmpLsumSq = (float*)malloc((bHeight) * (bWidth) * sizeof(float) ); float* tmpstdDev2 = (float*)malloc((bHeight) * (bWidth) * sizeof(float) ); @@ -1631,7 +1631,7 @@ void CropWindow::expose (Cairo::RefPtr cr) && stdDev_L2 > stdDev_L //this is the key to select fine detail within lower contrast on larger scale && stdDev_L > focus_threshby10 //options.highlightThreshold ) { - // transpareny depends on sdtDev_L2 and maxstdDev_L2 + // transparency depends on sdtDev_L2 and maxstdDev_L2 float transparency = 1.f - std::min(stdDev_L2 / maxstdDev_L2, 1.0f) ; // first row of circle guint8* currtmp = &curr[0] + (-3 * pixRowStride); diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 1b5ed3fa7..806af8b2e 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -2067,6 +2067,7 @@ bool EditorPanel::idle_sentToGimp (ProgressConnector *pc, rtengine::IImagef { img->free (); int errore = pc->returnValue(); + setProgressState(false); delete pc; if (!errore) { diff --git a/rtgui/editwidgets.h b/rtgui/editwidgets.h index 55b4ca3cc..0fa7a91bf 100644 --- a/rtgui/editwidgets.h +++ b/rtgui/editwidgets.h @@ -55,7 +55,7 @@ class RTSurface; * - drag1 * - button1Released * - * Actually, only curves does use this class, and everything is handled for curve implementor (as much as possible). + * Actually, only curves does use this class, and everything is handled for curve implementer (as much as possible). * See the curve's class documentation to see how to implement the curve's pipette feature. * * ### Event handling diff --git a/rtgui/options.cc b/rtgui/options.cc index f5b6b5b60..dcb16e1ea 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -225,7 +225,7 @@ Glib::ustring Options::getPreferredProfilePath() * *@param profName path + filename of the procparam to look for. A filename without path can be provided for backward compatibility. * In this case, this parameter will be updated with the new format. - *@return Send back the absolute path of the given filename or "Neutral" if "Neutral" has been set to profName. Implementor will have + *@return Send back the absolute path of the given filename or "Neutral" if "Neutral" has been set to profName. Implementer will have * to test for this particular value. If the absolute path is invalid (e.g. the file doesn't exist), it will return an empty string. */ Glib::ustring Options::findProfilePath(Glib::ustring &profName) diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index 5ab3ab85d..514685a16 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -383,8 +383,13 @@ RTWindow::RTWindow () iccProfileCreator->set_tooltip_markup (M ("MAIN_BUTTON_ICCPROFCREATOR")); iccProfileCreator->signal_clicked().connect ( sigc::mem_fun (*this, &RTWindow::showICCProfileCreator) ); - //Gtk::LinkButton* rtWeb = Gtk::manage (new Gtk::LinkButton ("http://rawtherapee.com")); // unused... but fail to be linked anyway !? - //Gtk::Button* preferences = Gtk::manage (new Gtk::Button (M("MAIN_BUTTON_PREFERENCES")+"...")); + Gtk::Button* helpBtn = Gtk::manage (new Gtk::Button ()); + setExpandAlignProperties (helpBtn, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + helpBtn->set_relief(Gtk::RELIEF_NONE); + helpBtn->set_image (*Gtk::manage (new RTImage ("questionmark.png"))); + helpBtn->set_tooltip_markup (M ("GENERAL_HELP")); + helpBtn->signal_clicked().connect (sigc::mem_fun (*this, &RTWindow::showRawPedia)); + Gtk::Button* preferences = Gtk::manage (new Gtk::Button ()); setExpandAlignProperties (preferences, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); preferences->set_relief(Gtk::RELIEF_NONE); @@ -392,7 +397,6 @@ RTWindow::RTWindow () preferences->set_tooltip_markup (M ("MAIN_BUTTON_PREFERENCES")); preferences->signal_clicked().connect ( sigc::mem_fun (*this, &RTWindow::showPreferences) ); - //btn_fullscreen = Gtk::manage( new Gtk::Button(M("MAIN_BUTTON_FULLSCREEN"))); btn_fullscreen = Gtk::manage ( new Gtk::Button()); setExpandAlignProperties (btn_fullscreen, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); btn_fullscreen->set_relief(Gtk::RELIEF_NONE); @@ -414,6 +418,7 @@ RTWindow::RTWindow () actionGrid->set_orientation (Gtk::ORIENTATION_VERTICAL); actionGrid->attach_next_to (prProgBar, Gtk::POS_BOTTOM, 1, 1); actionGrid->attach_next_to (*iccProfileCreator, Gtk::POS_BOTTOM, 1, 1); + actionGrid->attach_next_to (*helpBtn, Gtk::POS_BOTTOM, 1, 1); actionGrid->attach_next_to (*preferences, Gtk::POS_BOTTOM, 1, 1); actionGrid->attach_next_to (*btn_fullscreen, Gtk::POS_BOTTOM, 1, 1); mainNB->set_action_widget (actionGrid, Gtk::PACK_END); @@ -422,6 +427,7 @@ RTWindow::RTWindow () actionGrid->set_orientation (Gtk::ORIENTATION_HORIZONTAL); actionGrid->attach_next_to (prProgBar, Gtk::POS_RIGHT, 1, 1); actionGrid->attach_next_to (*iccProfileCreator, Gtk::POS_RIGHT, 1, 1); + actionGrid->attach_next_to (*helpBtn, Gtk::POS_RIGHT, 1, 1); actionGrid->attach_next_to (*preferences, Gtk::POS_RIGHT, 1, 1); actionGrid->attach_next_to (*btn_fullscreen, Gtk::POS_RIGHT, 1, 1); mainNB->set_action_widget (actionGrid, Gtk::PACK_END); @@ -913,6 +919,12 @@ void RTWindow::writeToolExpandedStatus (std::vector &tpOpen) } +void RTWindow::showRawPedia() +{ + GError* gerror = nullptr; + gtk_show_uri(nullptr, "https://rawpedia.rawtherapee.com/", GDK_CURRENT_TIME, &gerror); +} + void RTWindow::showICCProfileCreator () { ICCProfileCreator *iccpc = new ICCProfileCreator (this); diff --git a/rtgui/rtwindow.h b/rtgui/rtwindow.h index 100ddf636..4791ac6c1 100644 --- a/rtgui/rtwindow.h +++ b/rtgui/rtwindow.h @@ -90,6 +90,7 @@ public: bool on_window_state_event (GdkEventWindowState* event) override; void on_mainNB_switch_page (Gtk::Widget* widget, guint page_num); + void showRawPedia(); void showICCProfileCreator (); void showPreferences (); void on_realize () override; diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc index bcf578143..5295b9d61 100644 --- a/rtgui/thumbnail.cc +++ b/rtgui/thumbnail.cc @@ -341,34 +341,31 @@ void Thumbnail::notifylisterners_procParamsChanged(int whoChangedIt) * the Preferences). * * The result is a complete ProcParams with default values merged with the values - * from the default Raw or Image ProcParams, then with the values from the loaded - * ProcParams (sidecar or cache file). - */ + * from the loaded ProcParams (sidecar or cache file). +*/ void Thumbnail::loadProcParams () { MyMutex::MyLock lock(mutex); pparamsValid = false; pparams->setDefaults(); - const PartialProfile *defaultPP = ProfileStore::getInstance()->getDefaultPartialProfile(getType() == FT_Raw); - defaultPP->applyTo(pparams.get()); if (options.paramsLoadLocation == PLL_Input) { // try to load it from params file next to the image file - int ppres = pparams->load (fname + paramFileExtension); + const int ppres = pparams->load(fname + paramFileExtension); pparamsValid = !ppres && pparams->ppVersion >= 220; // if no success, try to load the cached version of the procparams if (!pparamsValid) { - pparamsValid = !pparams->load (getCacheFileName ("profiles", paramFileExtension)); + pparamsValid = !pparams->load(getCacheFileName("profiles", paramFileExtension)); } } else { // try to load it from cache - pparamsValid = !pparams->load (getCacheFileName ("profiles", paramFileExtension)); + pparamsValid = !pparams->load(getCacheFileName("profiles", paramFileExtension)); // if no success, try to load it from params file next to the image file if (!pparamsValid) { - int ppres = pparams->load (fname + paramFileExtension); + const int ppres = pparams->load(fname + paramFileExtension); pparamsValid = !ppres && pparams->ppVersion >= 220; } } diff --git a/tools/osx/libiconv_1.16_rt.patch b/tools/osx/libiconv_1.16_rt.patch new file mode 100644 index 000000000..470f7780c --- /dev/null +++ b/tools/osx/libiconv_1.16_rt.patch @@ -0,0 +1,31 @@ +diff --git a/lib/iconv.c b/lib/iconv.c +index b7a04f8..41c5896 100644 +--- a/lib/iconv.c ++++ b/lib/iconv.c +@@ -610,5 +610,26 @@ strong_alias (libiconv_open, iconv_open) + strong_alias (libiconv, iconv) + strong_alias (libiconv_close, iconv_close) + #endif ++ ++#undef iconv_open ++#undef iconv ++#undef iconv_close ++ ++LIBICONV_DLL_EXPORTED iconv_t iconv_open (const char* tocode, const char* fromcode) ++{ ++ return libiconv_open(tocode, fromcode); ++} ++ ++LIBICONV_DLL_EXPORTED size_t iconv (iconv_t icd, ++ ICONV_CONST char * * inbuf, size_t *inbytesleft, ++ char * * outbuf, size_t *outbytesleft) ++{ ++ return libiconv(icd, inbuf, inbytesleft, outbuf, outbytesleft); ++} ++ ++LIBICONV_DLL_EXPORTED int iconv_close (iconv_t icd) ++{ ++ return libiconv_close(icd); ++} + + #endif diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 2501e936b..3958326e8 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -99,6 +99,7 @@ MACOS="${CONTENTS}/MacOS" LIB="${CONTENTS}/Frameworks" ETC="${RESOURCES}/etc" EXECUTABLE="${MACOS}/rawtherapee" +GDK_PREFIX="/usr/local/opt/gdk-pixbuf" msg "Removing old files:" rm -rf "${APP}" "${PROJECT_NAME}_*.dmg" "*zip" @@ -111,13 +112,13 @@ install -d "${RESOURCES}" \ msg "Copying release files:" ditto "${CMAKE_BUILD_TYPE}/MacOS" "${MACOS}" -ditto "${CMAKE_BUILD_TYPE}/Resources" "${RESOURCES}" +ditto "Resources" "${RESOURCES}" msg "Copying dependencies from ${GTK_PREFIX}:" CheckLink "${EXECUTABLE}" msg "Copying library modules from ${GTK_PREFIX}:" -ditto --arch "${arch}" {"${GTK_PREFIX}/lib","${LIB}"}/gdk-pixbuf-2.0 +ditto --arch "${arch}" {"${GDK_PREFIX}/lib","${LIB}"}/gdk-pixbuf-2.0 ditto --arch "${arch}" {"${GTK_PREFIX}/lib","${LIB}"}/gtk-3.0 msg "Removing static libraries and cache files:" @@ -129,50 +130,56 @@ install -d "${ETC}/gtk-3.0" # Make Frameworks folder flat mv "${LIB}"/gdk-pixbuf-2.0/2*/loaders/*.so "${LIB}" mv "${LIB}"/gtk-3.0/3*/immodules/*.so "${LIB}" +# the print*.so lead to errors when running gtk-query-immodules-3.0, just seeing what the app does without, since they are not in immodules +# and including them leads to errors and a completely empty gtk.immodules file +# mv "${LIB}"/gtk-3.0/3*/printbackends/*.so "${LIB}" rm -r "${LIB}"/gtk-3.0 rm -r "${LIB}"/gdk-pixbuf-2.0 -"${GTK_PREFIX}/bin/gdk-pixbuf-query-loaders" "${LIB}"/libpix*.so > "${ETC}/gtk-3.0/gdk-pixbuf.loaders" -"${GTK_PREFIX}/bin/gtk-query-immodules-3.0" "${LIB}"/{im*.so,libprint*.so} > "${ETC}/gtk-3.0/gtk.immodules" +"${GDK_PREFIX}"/bin/gdk-pixbuf-query-loaders "${LIB}"/libpix*.so > "${ETC}"/gtk-3.0/gdk-pixbuf.loaders +"${GTK_PREFIX}"/bin/gtk-query-immodules-3.0 "${LIB}"/im*.so > "${ETC}"/gtk-3.0/gtk.immodules sed -i "" -e "s|${PWD}/RawTherapee.app/Contents/|/Applications/RawTherapee.app/Contents/|" "${ETC}/gtk-3.0/gdk-pixbuf.loaders" "${ETC}/gtk-3.0/gtk.immodules" -ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/glib-2.0/schemas -"${GTK_PREFIX}/bin/glib-compile-schemas" "${RESOURCES}/share/glib-2.0/schemas" +mkdir -p ${RESOURCES}/share/glib-2.0 +cp -pRL {"/usr/local","${RESOURCES}"}/share/glib-2.0/schemas +"/usr/local/bin/glib-compile-schemas" "${RESOURCES}/share/glib-2.0/schemas" msg "Copying shared files from ${GTK_PREFIX}:" -ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/mime +cp -pRL {"/usr/local","${RESOURCES}"}/share/mime + # GTK3 themes -ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/themes/Mac/gtk-3.0/gtk-keys.css -ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/themes/Default/gtk-3.0/gtk-keys.css +ditto {"/usr/local","${RESOURCES}"}/share/themes/Mac/gtk-3.0/gtk-keys.css +ditto {"/usr/local","${RESOURCES}"}/share/themes/Default/gtk-3.0/gtk-keys.css # Adwaita icons iconfolders=("16x16/actions" "16x16/devices" "16x16/mimetypes" "16x16/places" "16x16/status" "48x48/devices") for f in "${iconfolders[@]}"; do - ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/icons/Adwaita/"$f" + mkdir -p ${RESOURCES}/share/icons/Adwaita/${f} + cp /usr/local/share/icons/Adwaita/${f}/* "${RESOURCES}"/share/icons/Adwaita/${f} done -ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/icons/Adwaita/index.theme -"${GTK_PREFIX}/bin/gtk-update-icon-cache-3.0" "${RESOURCES}/share/icons/Adwaita" +ditto {"/usr/local","${RESOURCES}"}/share/icons/Adwaita/index.theme +"/usr/local/bin/gtk-update-icon-cache" "${RESOURCES}/share/icons/Adwaita" # Copy libjpeg-turbo into the app bundle -cp /opt/local/lib/libjpeg.62.dylib "${RESOURCES}/../Frameworks" +cp /usr/local/lib/libjpeg.*.dylib "${CONTENTS}/Frameworks" -# Copy libexpat into the app bundle -cp /opt/local/lib/libexpat.1.dylib "${RESOURCES}/../Frameworks" +# Copy libexpat into the app bundle (which is keg-only) +cp /usr/local/Cellar/expat/*/lib/libexpat.1.dylib "${CONTENTS}/Frameworks" # Copy libz into the app bundle -cp /opt/local/lib/libz.1.dylib "${RESOURCES}/../Frameworks" +cp /usr/lib/libz.1.dylib "${CONTENTS}/Frameworks" # Copy libtiff into the app bundle -cp /opt/local/lib/libtiff.5.dylib "${RESOURCES}/../Frameworks" +cp /usr/local/lib/libtiff.5.dylib "${CONTENTS}/Frameworks" # Copy the Lensfun database into the app bundle mkdir -p "${RESOURCES}/share/lensfun" -cp /opt/local/share/lensfun/version_2/* "${RESOURCES}/share/lensfun" +cp /usr/local/share/lensfun/version_2/* "${RESOURCES}/share/lensfun" # Copy liblensfun to Frameworks -cp /opt/local/lib/liblensfun.2.dylib "${RESOURCES}/../Frameworks" +cp /usr/local/lib/liblensfun.2.dylib "${CONTENTS}/Frameworks" # Copy libomp to Frameworks -cp /opt/local/lib/libomp.dylib "${RESOURCES}/../Frameworks" +cp /usr/local/lib/libomp.dylib "${CONTENTS}/Frameworks" # Install names find -E "${CONTENTS}" -type f -regex '.*/(rawtherapee-cli|rawtherapee|.*\.(dylib|so))' | while read -r x; do