Merge branch 'dev' of https://github.com/Beep6581/RawTherapee into defish
This commit is contained in:
commit
ebb0f8ebdd
8
.github/workflows/windows.yml
vendored
8
.github/workflows/windows.yml
vendored
@ -129,14 +129,6 @@ jobs:
|
|||||||
"symbolic/ui" \
|
"symbolic/ui" \
|
||||||
"$BUILD_DIR/share/icons/Adwaita/symbolic"
|
"$BUILD_DIR/share/icons/Adwaita/symbolic"
|
||||||
cp 'index.theme' "$BUILD_DIR/share/icons/Adwaita"
|
cp 'index.theme' "$BUILD_DIR/share/icons/Adwaita"
|
||||||
mkdir -p "$BUILD_DIR/share/icons/Adwaita/cursors"
|
|
||||||
cp -r \
|
|
||||||
"cursors/plus.cur" \
|
|
||||||
"cursors/sb_h_double_arrow.cur" \
|
|
||||||
"cursors/sb_left_arrow.cur" \
|
|
||||||
"cursors/sb_right_arrow.cur" \
|
|
||||||
"cursors/sb_v_double_arrow.cur" \
|
|
||||||
"$BUILD_DIR/share/icons/Adwaita/cursors"
|
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
echo "Copying GDK pixbuf."
|
echo "Copying GDK pixbuf."
|
||||||
|
@ -24,7 +24,13 @@ endif()
|
|||||||
if(UNIX)
|
if(UNIX)
|
||||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/rawtherapee.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/rawtherapee.desktop")
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/rawtherapee.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/rawtherapee.desktop")
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/rawtherapee.desktop" DESTINATION ${DESKTOPDIR})
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/rawtherapee.desktop" DESTINATION ${DESKTOPDIR})
|
||||||
install(DIRECTORY "${ICONTHEMEDIR}/hicolor" DESTINATION "${ICONSDIR}")
|
if(BUILD_BUNDLE)
|
||||||
|
install(DIRECTORY "${ICONTHEMEDIR}/hicolor" DESTINATION "${ICONSDIR}")
|
||||||
|
else()
|
||||||
|
# For theme 'hicolor' (containing app icon), 'index.theme' shall not be installed for Linux build with 'BUILD_BUNDLE=OFF' option
|
||||||
|
# (to avoid conflict with existing 'index.theme' distro file)
|
||||||
|
install(DIRECTORY "${ICONTHEMEDIR}/hicolor" DESTINATION "${ICONSDIR}" PATTERN "index.theme" EXCLUDE)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(FILES ${LANGUAGEFILES} DESTINATION "${DATADIR}/languages")
|
install(FILES ${LANGUAGEFILES} DESTINATION "${DATADIR}/languages")
|
||||||
|
98
rtdata/icons/rawtherapee/scalable/apps/folder-subfolder.svg
Normal file
98
rtdata/icons/rawtherapee/scalable/apps/folder-subfolder.svg
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
width="24px"
|
||||||
|
height="24px"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
version="1.1"
|
||||||
|
id="SVGRoot"
|
||||||
|
inkscape:export-filename="/tmp/template.png"
|
||||||
|
inkscape:export-xdpi="96"
|
||||||
|
inkscape:export-ydpi="96"
|
||||||
|
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||||
|
sodipodi:docname="folder-subfolder.svg"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#E0E1E2"
|
||||||
|
bordercolor="#666768"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="27.559042"
|
||||||
|
inkscape:cx="11.067148"
|
||||||
|
inkscape:cy="11.212291"
|
||||||
|
inkscape:document-units="px"
|
||||||
|
inkscape:current-layer="layer1"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1041"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:grid-bbox="true"
|
||||||
|
inkscape:pagecheckerboard="false"
|
||||||
|
inkscape:snap-bbox="true"
|
||||||
|
inkscape:bbox-nodes="true"
|
||||||
|
inkscape:snap-others="false"
|
||||||
|
inkscape:object-nodes="true"
|
||||||
|
inkscape:snap-grids="false"
|
||||||
|
inkscape:snap-bbox-midpoints="false"
|
||||||
|
inkscape:snap-smooth-nodes="true"
|
||||||
|
inkscape:snap-midpoints="true"
|
||||||
|
inkscape:snap-intersection-paths="true"
|
||||||
|
inkscape:object-paths="true"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:deskcolor="#E0E1E2">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid1374"
|
||||||
|
originx="1"
|
||||||
|
originy="1"
|
||||||
|
empspacing="11"
|
||||||
|
dotted="false"
|
||||||
|
spacingx="1"
|
||||||
|
spacingy="1"
|
||||||
|
visible="true" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<defs
|
||||||
|
id="defs815" />
|
||||||
|
<metadata
|
||||||
|
id="metadata818">
|
||||||
|
<rdf:RDF />
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
id="layer1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
inkscape:label="Layer 1">
|
||||||
|
<path
|
||||||
|
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.5;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
d="M 8.3845376,8 C 8.094003,8 7.7740668,8.0155229 7.4612704,8.2668157 7.148474,8.5181086 7.055613,8.9356452 7.0631644,9.2267877 V 19.533781 c -8.84e-5,0.199356 0.082156,0.389899 0.2272874,0.526573 0.2698504,0.283712 0.5071187,0.520303 0.7905739,0.765991 -0.086082,-0.07558 -0.2899772,-0.262658 -0.2400017,-0.577429 l 1.5331317,-7.333295 c 0.061673,-0.345222 0.3622328,-0.596383 0.7129203,-0.595747 h 10.693806 v -2.030059 l -0.0014,0.0056 c 0.0021,-0.28168 -0.08163,-0.6906547 -0.395249,-0.9458534 C 20.070572,9.094409 19.749426,9.0799684 19.458096,9.0799684 H 12.80182 L 12.450301,8.4785743 C 12.405002,8.4009886 12.345637,8.332527 12.275248,8.2766978 12.119431,8.1534118 11.88987,8 11.527034,8 Z"
|
||||||
|
id="path1026"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="sscccccccccccscccss" />
|
||||||
|
<path
|
||||||
|
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.9;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.85216;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||||
|
d="M 10.087076,12.319875 C 9.7363885,12.319329 9.4358285,12.53473 9.3741557,12.830801 L 7.841024,20.248916 c -0.07805,0.379479 0.2622,0.727446 0.7115087,0.727646 H 20.824645 c 0.350155,-4.1e-5 0.649929,-0.215306 0.711508,-0.510926 l 1.534544,-7.418115 c 0.07815,-0.379963 -0.263039,-0.728199 -0.71292,-0.727646 z"
|
||||||
|
id="rect1030"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccccccccc" />
|
||||||
|
<g
|
||||||
|
id="g1729"
|
||||||
|
style="opacity:0.5">
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#cccccc;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="M 2,3 V 19 H 5"
|
||||||
|
id="path1712" />
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#cccccc;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 2,3 v 8 h 3"
|
||||||
|
id="path1714" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 6.2 KiB |
File diff suppressed because it is too large
Load Diff
@ -203,6 +203,7 @@ FILEBROWSER_SHOWRANK4HINT;Show images ranked as 4-star.\nShortcut: <b>Shift-4</b
|
|||||||
FILEBROWSER_SHOWRANK5HINT;Show images ranked as 5-star.\nShortcut: <b>Shift-5</b>
|
FILEBROWSER_SHOWRANK5HINT;Show images ranked as 5-star.\nShortcut: <b>Shift-5</b>
|
||||||
FILEBROWSER_SHOWRECENTLYSAVEDHINT;Show saved images.\nShortcut: <b>Alt-7</b>
|
FILEBROWSER_SHOWRECENTLYSAVEDHINT;Show saved images.\nShortcut: <b>Alt-7</b>
|
||||||
FILEBROWSER_SHOWRECENTLYSAVEDNOTHINT;Show unsaved images.\nShortcut: <b>Alt-6</b>
|
FILEBROWSER_SHOWRECENTLYSAVEDNOTHINT;Show unsaved images.\nShortcut: <b>Alt-6</b>
|
||||||
|
FILEBROWSER_SHOWRECURSIVE;Show images in sub-folders recursively.
|
||||||
FILEBROWSER_SHOWTRASHHINT;Show contents of trash.\nShortcut: <b>Ctrl-t</b>
|
FILEBROWSER_SHOWTRASHHINT;Show contents of trash.\nShortcut: <b>Ctrl-t</b>
|
||||||
FILEBROWSER_SHOWUNCOLORHINT;Show images without a color label.\nShortcut: <b>Alt-0</b>
|
FILEBROWSER_SHOWUNCOLORHINT;Show images without a color label.\nShortcut: <b>Alt-0</b>
|
||||||
FILEBROWSER_SHOWUNRANKHINT;Show unranked images.\nShortcut: <b>Shift-0</b>
|
FILEBROWSER_SHOWUNRANKHINT;Show unranked images.\nShortcut: <b>Shift-0</b>
|
||||||
@ -1845,6 +1846,9 @@ PREFERENCES_BEHADDALLHINT;Set all parameters to the <b>Add</b> mode.\nAdjustment
|
|||||||
PREFERENCES_BEHAVIOR;Behavior
|
PREFERENCES_BEHAVIOR;Behavior
|
||||||
PREFERENCES_BEHSETALL;All to 'Set'
|
PREFERENCES_BEHSETALL;All to 'Set'
|
||||||
PREFERENCES_BEHSETALLHINT;Set all parameters to the <b>Set</b> mode.\nAdjustments of parameters in the batch tool panel will be <b>absolute</b>, the actual values will be displayed.
|
PREFERENCES_BEHSETALLHINT;Set all parameters to the <b>Set</b> mode.\nAdjustments of parameters in the batch tool panel will be <b>absolute</b>, the actual values will be displayed.
|
||||||
|
PREFERENCES_BROWSERECURSIVEDEPTH;Browse sub-folders depth
|
||||||
|
PREFERENCES_BROWSERECURSIVEFOLLOWLINKS;Follow symbolic links when browsing sub-folders
|
||||||
|
PREFERENCES_BROWSERECURSIVEMAXDIRS;Maximum sub-folders
|
||||||
PREFERENCES_CACHECLEAR;Clear
|
PREFERENCES_CACHECLEAR;Clear
|
||||||
PREFERENCES_CACHECLEAR_ALL;Clear all cached files:
|
PREFERENCES_CACHECLEAR_ALL;Clear all cached files:
|
||||||
PREFERENCES_CACHECLEAR_ALLBUTPROFILES;Clear all cached files except for cached processing profiles:
|
PREFERENCES_CACHECLEAR_ALLBUTPROFILES;Clear all cached files except for cached processing profiles:
|
||||||
@ -2637,8 +2641,8 @@ TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced Raw
|
|||||||
TP_ICM_INPUTCUSTOM;Custom
|
TP_ICM_INPUTCUSTOM;Custom
|
||||||
TP_ICM_INPUTCUSTOM_TOOLTIP;Select your own DCP/ICC color profile file for the camera.
|
TP_ICM_INPUTCUSTOM_TOOLTIP;Select your own DCP/ICC color profile file for the camera.
|
||||||
TP_ICM_INPUTDLGLABEL;Select Input DCP/ICC Profile...
|
TP_ICM_INPUTDLGLABEL;Select Input DCP/ICC Profile...
|
||||||
TP_ICM_INPUTEMBEDDED;Use embedded, if possible
|
TP_ICM_INPUTEMBEDDED;Use embedded
|
||||||
TP_ICM_INPUTEMBEDDED_TOOLTIP;Use color profile embedded in non-raw files.
|
TP_ICM_INPUTEMBEDDED_TOOLTIP;Use the color profile embedded in the file.\nIf unavailable, fall back to Camera standard
|
||||||
TP_ICM_INPUTNONE;No profile
|
TP_ICM_INPUTNONE;No profile
|
||||||
TP_ICM_INPUTNONE_TOOLTIP;Use no input color profile at all.\nUse only in special cases.
|
TP_ICM_INPUTNONE_TOOLTIP;Use no input color profile at all.\nUse only in special cases.
|
||||||
TP_ICM_INPUTPROFILE;Input Profile
|
TP_ICM_INPUTPROFILE;Input Profile
|
||||||
|
@ -2206,7 +2206,7 @@ Camera constants:
|
|||||||
},
|
},
|
||||||
|
|
||||||
{ // Quality B
|
{ // Quality B
|
||||||
"make_model": "OLYMPUS TG-6",
|
"make_model": [ "OLYMPUS TG-6", "OM Digital Solutions TG-7" ],
|
||||||
"dcraw_matrix" : [10899, -3833, -1082, -2112, 10736, 1575, -267, 1452, 5269], // DNG v13.2
|
"dcraw_matrix" : [10899, -3833, -1082, -2112, 10736, 1575, -267, 1452, 5269], // DNG v13.2
|
||||||
"raw_crop": [ 0, 0, -24, 0 ] // 24 pixels at right are garbage
|
"raw_crop": [ 0, 0, -24, 0 ] // 24 pixels at right are garbage
|
||||||
},
|
},
|
||||||
|
@ -6124,7 +6124,7 @@ get2_256:
|
|||||||
// imCanon.ColorDataVer = 11;
|
// imCanon.ColorDataVer = 11;
|
||||||
imCanon.ColorDataSubVer = get2();
|
imCanon.ColorDataSubVer = get2();
|
||||||
|
|
||||||
fseek(ifp, save1 + ((0x0069+0x0064) << 1), SEEK_SET);
|
fseek(ifp, save1 + (0x0069 << 1), SEEK_SET);
|
||||||
FORC4 cam_mul[c ^ (c >> 1)] = (float)get2();
|
FORC4 cam_mul[c ^ (c >> 1)] = (float)get2();
|
||||||
|
|
||||||
offsetChannelBlackLevel2 = save1 + ((0x0069+0x0102) << 1);
|
offsetChannelBlackLevel2 = save1 + ((0x0069+0x0102) << 1);
|
||||||
@ -10434,7 +10434,7 @@ konica_400z:
|
|||||||
filters = 0x16161616;
|
filters = 0x16161616;
|
||||||
load_raw = &CLASS packed_load_raw;
|
load_raw = &CLASS packed_load_raw;
|
||||||
load_flags = 30;
|
load_flags = 30;
|
||||||
} else if (!strcmp(make,"Olympus")) {
|
} else if (!strcmp(make,"Olympus") || !strncmp(make, "OM Digi", 7)) {
|
||||||
height += height & 1;
|
height += height & 1;
|
||||||
if (exif_cfa) filters = exif_cfa;
|
if (exif_cfa) filters = exif_cfa;
|
||||||
if (width == 4100) width -= 4;
|
if (width == 4100) width -= 4;
|
||||||
|
@ -145,6 +145,7 @@ void ffInfo::updateRawImage()
|
|||||||
int H = ri->get_height();
|
int H = ri->get_height();
|
||||||
int W = ri->get_width();
|
int W = ri->get_width();
|
||||||
ri->compress_image(0);
|
ri->compress_image(0);
|
||||||
|
ri->set_prefilters();
|
||||||
int rSize = W * ((ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS || ri->get_colors() == 1) ? 1 : 3);
|
int rSize = W * ((ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS || ri->get_colors() == 1) ? 1 : 3);
|
||||||
acc_t **acc = new acc_t*[H];
|
acc_t **acc = new acc_t*[H];
|
||||||
|
|
||||||
@ -165,6 +166,7 @@ void ffInfo::updateRawImage()
|
|||||||
|
|
||||||
if( !temp->loadRaw(true)) {
|
if( !temp->loadRaw(true)) {
|
||||||
temp->compress_image(0); //\ TODO would be better working on original, because is temporary
|
temp->compress_image(0); //\ TODO would be better working on original, because is temporary
|
||||||
|
temp->set_prefilters();
|
||||||
nFiles++;
|
nFiles++;
|
||||||
|
|
||||||
if( ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS || ri->get_colors() == 1 ) {
|
if( ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS || ri->get_colors() == 1 ) {
|
||||||
@ -204,6 +206,7 @@ void ffInfo::updateRawImage()
|
|||||||
ri = nullptr;
|
ri = nullptr;
|
||||||
} else {
|
} else {
|
||||||
ri->compress_image(0);
|
ri->compress_image(0);
|
||||||
|
ri->set_prefilters();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,6 +351,7 @@ Imagefloat* ImProcFunctions::lab2rgbOut(LabImage* lab, int cx, int cy, int cw, i
|
|||||||
|
|
||||||
image->ExecCMSTransform(hTransform, *lab, cx, cy);
|
image->ExecCMSTransform(hTransform, *lab, cx, cy);
|
||||||
cmsDeleteTransform(hTransform);
|
cmsDeleteTransform(hTransform);
|
||||||
|
cmsCloseProfile(iprof);
|
||||||
image->normalizeFloatTo65535();
|
image->normalizeFloatTo65535();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -263,13 +263,21 @@ void cfaboxblur(const float* const * riFlatFile, float* cfablur, int boxH, int b
|
|||||||
namespace rtengine
|
namespace rtengine
|
||||||
{
|
{
|
||||||
|
|
||||||
void RawImageSource::processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, array2D<float> &rawData, const float black[4])
|
void RawImageSource::processFlatField(const procparams::RAWParams &raw, RawImage *riFlatFile, array2D<float> &rawData, const float black[4])
|
||||||
{
|
{
|
||||||
// BENCHFUN
|
// BENCHFUN
|
||||||
std::unique_ptr<float[]> cfablur(new float[H * W]);
|
std::unique_ptr<float[]> cfablur(new float[H * W]);
|
||||||
|
|
||||||
const int BS = raw.ff_BlurRadius + (raw.ff_BlurRadius & 1);
|
const int BS = raw.ff_BlurRadius + (raw.ff_BlurRadius & 1);
|
||||||
|
|
||||||
|
std::array<float, 4> ffblack;
|
||||||
|
{
|
||||||
|
const auto tmpfilters = riFlatFile->get_filters();
|
||||||
|
riFlatFile->set_filters(riFlatFile->prefilters); // we need 4 blacks for bayer processing
|
||||||
|
riFlatFile->get_colorsCoeff(nullptr, nullptr, ffblack.data(), false);
|
||||||
|
riFlatFile->set_filters(tmpfilters);
|
||||||
|
}
|
||||||
|
|
||||||
if (raw.ff_BlurType == procparams::RAWParams::getFlatFieldBlurTypeString(procparams::RAWParams::FlatFieldBlurType::V)) {
|
if (raw.ff_BlurType == procparams::RAWParams::getFlatFieldBlurTypeString(procparams::RAWParams::FlatFieldBlurType::V)) {
|
||||||
cfaboxblur(riFlatFile->data, cfablur.get(), 2 * BS, 0, H, W);
|
cfaboxblur(riFlatFile->data, cfablur.get(), 2 * BS, 0, H, W);
|
||||||
} else if (raw.ff_BlurType == procparams::RAWParams::getFlatFieldBlurTypeString(procparams::RAWParams::FlatFieldBlurType::H)) {
|
} else if (raw.ff_BlurType == procparams::RAWParams::getFlatFieldBlurTypeString(procparams::RAWParams::FlatFieldBlurType::H)) {
|
||||||
@ -291,7 +299,7 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra
|
|||||||
const int col = 2 * (W >> 2) + n;
|
const int col = 2 * (W >> 2) + n;
|
||||||
const int c = ri->get_colors() != 1 ? FC(row, col) : 0;
|
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;
|
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] - black[c4]);
|
refcolor[m][n] = std::max(0.0f, cfablur[row * W + col] - ffblack[c4]);
|
||||||
}
|
}
|
||||||
|
|
||||||
float limitFactor = 1.f;
|
float limitFactor = 1.f;
|
||||||
@ -314,7 +322,7 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra
|
|||||||
clippedBefore = true;
|
clippedBefore = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
const float tempval = (rawVal - black[c4]) * (refcolor[m][n] / std::max(1e-5f, cfablur[(row + m) * W + col + n] - black[c4]));
|
const float tempval = (rawVal - black[c4]) * (refcolor[m][n] / std::max(1e-5f, cfablur[(row + m) * W + col + n] - ffblack[c4]));
|
||||||
maxval = std::max(maxval, tempval);
|
maxval = std::max(maxval, tempval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -363,6 +371,9 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra
|
|||||||
const vfloat blackv[2] = {_mm_set_ps(black[c4[0][1]], black[c4[0][0]], black[c4[0][1]], black[c4[0][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]])
|
_mm_set_ps(black[c4[1][1]], black[c4[1][0]], black[c4[1][1]], black[c4[1][0]])
|
||||||
};
|
};
|
||||||
|
const vfloat ffblackv[2] = {_mm_set_ps(ffblack[c4[0][1]], ffblack[c4[0][0]], ffblack[c4[0][1]], ffblack[c4[0][0]]),
|
||||||
|
_mm_set_ps(ffblack[c4[1][1]], ffblack[c4[1][0]], ffblack[c4[1][1]], ffblack[c4[1][0]])
|
||||||
|
};
|
||||||
|
|
||||||
const vfloat onev = F2V(1.f);
|
const vfloat onev = F2V(1.f);
|
||||||
const vfloat minValuev = F2V(minValue);
|
const vfloat minValuev = F2V(minValue);
|
||||||
@ -375,10 +386,11 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra
|
|||||||
int col = 0;
|
int col = 0;
|
||||||
#ifdef __SSE2__
|
#ifdef __SSE2__
|
||||||
const vfloat rowBlackv = blackv[row & 1];
|
const vfloat rowBlackv = blackv[row & 1];
|
||||||
|
const vfloat ffrowBlackv = ffblackv[row & 1];
|
||||||
const vfloat rowRefcolorv = refcolorv[row & 1];
|
const vfloat rowRefcolorv = refcolorv[row & 1];
|
||||||
|
|
||||||
for (; col < W - 3; col += 4) {
|
for (; col < W - 3; col += 4) {
|
||||||
const vfloat blurv = LVFU(cfablur[row * W + col]) - rowBlackv;
|
const vfloat blurv = LVFU(cfablur[row * W + col]) - ffrowBlackv;
|
||||||
vfloat vignettecorrv = rowRefcolorv / blurv;
|
vfloat vignettecorrv = rowRefcolorv / blurv;
|
||||||
vignettecorrv = vself(vmaskf_le(blurv, minValuev), onev, vignettecorrv);
|
vignettecorrv = vself(vmaskf_le(blurv, minValuev), onev, vignettecorrv);
|
||||||
const vfloat valv = LVFU(rawData[row][col]) - rowBlackv;
|
const vfloat valv = LVFU(rawData[row][col]) - rowBlackv;
|
||||||
@ -388,7 +400,7 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (; col < W; ++col) {
|
for (; col < W; ++col) {
|
||||||
const float blur = cfablur[row * W + col] - black[c4[row & 1][col & 1]];
|
const float blur = cfablur[row * W + col] - ffblack[c4[row & 1][col & 1]];
|
||||||
const float vignettecorr = blur <= minValue ? 1.f : refcolor[row & 1][col & 1] / blur;
|
const float vignettecorr = blur <= minValue ? 1.f : refcolor[row & 1][col & 1] / blur;
|
||||||
rawData[row][col] = (rawData[row][col] - black[c4[row & 1][col & 1]]) * vignettecorr + black[c4[row & 1][col & 1]];
|
rawData[row][col] = (rawData[row][col] - black[c4[row & 1][col & 1]]) * vignettecorr + black[c4[row & 1][col & 1]];
|
||||||
}
|
}
|
||||||
@ -490,6 +502,10 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra
|
|||||||
const vfloat blackv[2] = {_mm_set_ps(black[c4[0][1]], black[c4[0][0]], black[c4[0][1]], black[c4[0][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]])
|
_mm_set_ps(black[c4[1][1]], black[c4[1][0]], black[c4[1][1]], black[c4[1][0]])
|
||||||
};
|
};
|
||||||
|
const vfloat ffblackv[2] = {_mm_set_ps(ffblack[c4[0][1]], ffblack[c4[0][0]], ffblack[c4[0][1]], ffblack[c4[0][0]]),
|
||||||
|
_mm_set_ps(ffblack[c4[1][1]], ffblack[c4[1][0]], ffblack[c4[1][1]], ffblack[c4[1][0]])
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
const vfloat epsv = F2V(1e-5f);
|
const vfloat epsv = F2V(1e-5f);
|
||||||
#endif
|
#endif
|
||||||
@ -501,10 +517,11 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra
|
|||||||
int col = 0;
|
int col = 0;
|
||||||
#ifdef __SSE2__
|
#ifdef __SSE2__
|
||||||
const vfloat rowBlackv = blackv[row & 1];
|
const vfloat rowBlackv = blackv[row & 1];
|
||||||
|
const vfloat ffrowBlackv = ffblackv[row & 1];
|
||||||
|
|
||||||
for (; col < W - 3; col += 4) {
|
for (; col < W - 3; col += 4) {
|
||||||
const vfloat linecorrv = SQRV(vmaxf(LVFU(cfablur[row * W + col]) - rowBlackv, epsv)) /
|
const vfloat linecorrv = SQRV(vmaxf(LVFU(cfablur[row * W + col]) - ffrowBlackv, epsv)) /
|
||||||
(vmaxf(LVFU(cfablur1[row * W + col]) - rowBlackv, epsv) * vmaxf(LVFU(cfablur2[row * W + col]) - rowBlackv, epsv));
|
(vmaxf(LVFU(cfablur1[row * W + col]) - ffrowBlackv, epsv) * vmaxf(LVFU(cfablur2[row * W + col]) - ffrowBlackv, epsv));
|
||||||
const vfloat valv = LVFU(rawData[row][col]) - rowBlackv;
|
const vfloat valv = LVFU(rawData[row][col]) - rowBlackv;
|
||||||
STVFU(rawData[row][col], valv * linecorrv + rowBlackv);
|
STVFU(rawData[row][col], valv * linecorrv + rowBlackv);
|
||||||
}
|
}
|
||||||
@ -512,8 +529,8 @@ void RawImageSource::processFlatField(const procparams::RAWParams &raw, const Ra
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (; col < W; ++col) {
|
for (; col < W; ++col) {
|
||||||
const float linecorr = SQR(std::max(1e-5f, cfablur[row * W + col] - black[c4[row & 1][col & 1]])) /
|
const float linecorr = SQR(std::max(1e-5f, cfablur[row * W + col] - ffblack[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]]));
|
(std::max(1e-5f, cfablur1[row * W + col] - ffblack[c4[row & 1][col & 1]]) * std::max(1e-5f, cfablur2[row * W + col] - ffblack[c4[row & 1][col & 1]]));
|
||||||
rawData[row][col] = (rawData[row][col] - black[c4[row & 1][col & 1]]) * linecorr + 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]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1078,7 +1078,7 @@ DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, DCPProfileA
|
|||||||
|
|
||||||
DCPProfile *dcpProf = nullptr;
|
DCPProfile *dcpProf = nullptr;
|
||||||
cmsHPROFILE dummy;
|
cmsHPROFILE dummy;
|
||||||
findInputProfile(cmp.inputProfile, nullptr, (static_cast<const FramesData*>(getMetaData()))->getCamera(), &dcpProf, dummy);
|
findInputProfile(cmp.inputProfile, nullptr, (static_cast<const FramesData*>(getMetaData()))->getCamera(), fileName, &dcpProf, dummy);
|
||||||
|
|
||||||
if (dcpProf == nullptr) {
|
if (dcpProf == nullptr) {
|
||||||
if (settings->verbose) {
|
if (settings->verbose) {
|
||||||
@ -1094,8 +1094,24 @@ DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, DCPProfileA
|
|||||||
|
|
||||||
void RawImageSource::convertColorSpace(Imagefloat* image, const ColorManagementParams &cmp, const ColorTemp &wb)
|
void RawImageSource::convertColorSpace(Imagefloat* image, const ColorManagementParams &cmp, const ColorTemp &wb)
|
||||||
{
|
{
|
||||||
|
cmsHPROFILE in;
|
||||||
|
DCPProfile *dcpProf;
|
||||||
|
|
||||||
|
if (!findInputProfile(cmp.inputProfile, embProfile, (static_cast<const FramesData*>(getMetaData()))->getCamera(), fileName, &dcpProf, in)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
double pre_mul[3] = { ri->get_pre_mul(0), ri->get_pre_mul(1), ri->get_pre_mul(2) };
|
double pre_mul[3] = { ri->get_pre_mul(0), ri->get_pre_mul(1), ri->get_pre_mul(2) };
|
||||||
colorSpaceConversion(image, cmp, wb, pre_mul, embProfile, camProfile, imatrices.xyz_cam, (static_cast<const FramesData*>(getMetaData()))->getCamera());
|
colorSpaceConversion_(image, cmp, wb, pre_mul, camProfile, imatrices.xyz_cam, in, dcpProf);
|
||||||
|
}
|
||||||
|
|
||||||
|
void RawImageSource::colorSpaceConversion(Imagefloat* im, const ColorManagementParams& cmp, const ColorTemp &wb, double pre_mul[3], cmsHPROFILE embedded, cmsHPROFILE camprofile, double cam[3][3], const std::string &camName, const Glib::ustring &fileName)
|
||||||
|
{
|
||||||
|
cmsHPROFILE in;
|
||||||
|
DCPProfile *dcpProf;
|
||||||
|
if (findInputProfile(cmp.inputProfile, embedded, camName, fileName, &dcpProf, in)) {
|
||||||
|
colorSpaceConversion_(im, cmp, wb, pre_mul, camprofile, cam, in, dcpProf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RawImageSource::getFullSize(int& w, int& h, int tr)
|
void RawImageSource::getFullSize(int& w, int& h, int tr)
|
||||||
@ -3156,18 +3172,11 @@ lab2ProphotoRgbD50(float L, float A, float B, float& r, float& g, float& b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Converts raw image including ICC input profile to working space - floating point version
|
// Converts raw image including ICC input profile to working space - floating point version
|
||||||
void RawImageSource::colorSpaceConversion_(Imagefloat* im, const ColorManagementParams& cmp, const ColorTemp &wb, double pre_mul[3], cmsHPROFILE embedded, cmsHPROFILE camprofile, double camMatrix[3][3], const std::string &camName)
|
void RawImageSource::colorSpaceConversion_(Imagefloat* im, const ColorManagementParams& cmp, const ColorTemp &wb, double pre_mul[3], cmsHPROFILE camprofile, double camMatrix[3][3], cmsHPROFILE in, DCPProfile *dcpProf)
|
||||||
{
|
{
|
||||||
|
|
||||||
// MyTime t1, t2, t3;
|
// MyTime t1, t2, t3;
|
||||||
// t1.set ();
|
// t1.set ();
|
||||||
cmsHPROFILE in;
|
|
||||||
DCPProfile *dcpProf;
|
|
||||||
|
|
||||||
if (!findInputProfile(cmp.inputProfile, embedded, camName, &dcpProf, in)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dcpProf != nullptr) {
|
if (dcpProf != nullptr) {
|
||||||
// DCP processing
|
// DCP processing
|
||||||
const DCPProfile::Triple pre_mul_row = {
|
const DCPProfile::Triple pre_mul_row = {
|
||||||
@ -3557,7 +3566,7 @@ void RawImageSource::colorSpaceConversion_(Imagefloat* im, const ColorManagement
|
|||||||
|
|
||||||
|
|
||||||
// Determine RAW input and output profiles. Returns TRUE on success
|
// 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)
|
bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embedded, std::string camName, const Glib::ustring &fileName, DCPProfile **dcpProf, cmsHPROFILE& in)
|
||||||
{
|
{
|
||||||
in = nullptr; // cam will be taken on NULL
|
in = nullptr; // cam will be taken on NULL
|
||||||
*dcpProf = nullptr;
|
*dcpProf = nullptr;
|
||||||
@ -3566,8 +3575,12 @@ bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embed
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (embedded && inProfile == "(embedded)") {
|
if (inProfile == "(embedded)") {
|
||||||
in = embedded;
|
if (embedded) {
|
||||||
|
in = embedded;
|
||||||
|
} else {
|
||||||
|
*dcpProf = DCPStore::getInstance()->getProfile(fileName);
|
||||||
|
}
|
||||||
} else if (inProfile == "(cameraICC)") {
|
} else if (inProfile == "(cameraICC)") {
|
||||||
// DCPs have higher quality, so use them first
|
// DCPs have higher quality, so use them first
|
||||||
*dcpProf = DCPStore::getInstance()->getStdProfile(camName);
|
*dcpProf = DCPStore::getInstance()->getStdProfile(camName);
|
||||||
|
@ -46,7 +46,7 @@ private:
|
|||||||
static DiagonalCurve *phaseOneIccCurveInv;
|
static DiagonalCurve *phaseOneIccCurveInv;
|
||||||
static LUTf invGrad; // for fast_demosaic
|
static LUTf invGrad; // for fast_demosaic
|
||||||
static LUTf initInvGrad ();
|
static LUTf initInvGrad ();
|
||||||
static void colorSpaceConversion_ (Imagefloat* im, const procparams::ColorManagementParams& cmp, const ColorTemp &wb, double pre_mul[3], cmsHPROFILE embedded, cmsHPROFILE camprofile, double cam[3][3], const std::string &camName);
|
static void colorSpaceConversion_ (Imagefloat* im, const procparams::ColorManagementParams& cmp, const ColorTemp &wb, double pre_mul[3], cmsHPROFILE camprofile, double cam[3][3], cmsHPROFILE in, DCPProfile *dcpProf);
|
||||||
static int defTransform (const RawImage *ri, int tran);
|
static int defTransform (const RawImage *ri, int tran);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -138,7 +138,7 @@ public:
|
|||||||
return rgbSourceModified; // tracks whether cached rgb output of demosaic has been modified
|
return rgbSourceModified; // tracks whether cached rgb output of demosaic has been modified
|
||||||
}
|
}
|
||||||
|
|
||||||
void processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, array2D<float> &rawData, const float black[4]);
|
void processFlatField(const procparams::RAWParams &raw, RawImage *riFlatFile, array2D<float> &rawData, const float black[4]);
|
||||||
void copyOriginalPixels(const procparams::RAWParams &raw, RawImage *ri, const RawImage *riDark, RawImage *riFlatFile, array2D<float> &rawData );
|
void copyOriginalPixels(const procparams::RAWParams &raw, RawImage *ri, const RawImage *riDark, RawImage *riFlatFile, array2D<float> &rawData );
|
||||||
void scaleColors (int winx, int winy, int winw, int winh, const procparams::RAWParams &raw, array2D<float> &rawData); // raw for cblack
|
void scaleColors (int winx, int winy, int winw, int winh, const procparams::RAWParams &raw, array2D<float> &rawData); // raw for cblack
|
||||||
void WBauto(bool extra, double &tempref, double &greenref, array2D<float> &redloc, array2D<float> &greenloc, array2D<float> &blueloc, int bfw, int bfh, double &avg_rm, double &avg_gm, double &avg_bm, double &tempitc, double &greenitc, float &temp0, float &delta, int &bia, int &dread, int &kcam, int &nocam, float &studgood, float &minchrom, int &kmin, float &minhist, float &maxhist, bool &twotimes, const procparams::WBParams & wbpar, int begx, int begy, int yEn, int xEn, int cx, int cy, const procparams::ColorManagementParams &cmp, const procparams::RAWParams &raw, const procparams::ToneCurveParams &hrp) override;
|
void WBauto(bool extra, double &tempref, double &greenref, array2D<float> &redloc, array2D<float> &greenloc, array2D<float> &blueloc, int bfw, int bfh, double &avg_rm, double &avg_gm, double &avg_bm, double &tempitc, double &greenitc, float &temp0, float &delta, int &bia, int &dread, int &kcam, int &nocam, float &studgood, float &minchrom, int &kmin, float &minhist, float &maxhist, bool &twotimes, const procparams::WBParams & wbpar, int begx, int begy, int yEn, int xEn, int cx, int cy, const procparams::ColorManagementParams &cmp, const procparams::RAWParams &raw, const procparams::ToneCurveParams &hrp) override;
|
||||||
@ -190,11 +190,8 @@ public:
|
|||||||
DCPProfile *getDCP(const procparams::ColorManagementParams &cmp, DCPProfileApplyState &as) override;
|
DCPProfile *getDCP(const procparams::ColorManagementParams &cmp, DCPProfileApplyState &as) override;
|
||||||
|
|
||||||
void convertColorSpace(Imagefloat* image, const procparams::ColorManagementParams &cmp, const ColorTemp &wb) override;
|
void convertColorSpace(Imagefloat* image, const procparams::ColorManagementParams &cmp, const ColorTemp &wb) override;
|
||||||
static bool findInputProfile(Glib::ustring inProfile, cmsHPROFILE embedded, std::string camName, DCPProfile **dcpProf, cmsHPROFILE& in);
|
static bool findInputProfile(Glib::ustring inProfile, cmsHPROFILE embedded, std::string camName, const Glib::ustring &filename, DCPProfile **dcpProf, cmsHPROFILE& in);
|
||||||
static void colorSpaceConversion(Imagefloat* im, const procparams::ColorManagementParams& cmp, const ColorTemp &wb, double pre_mul[3], cmsHPROFILE embedded, cmsHPROFILE camprofile, double cam[3][3], const std::string &camName)
|
static void colorSpaceConversion(Imagefloat* im, const procparams::ColorManagementParams& cmp, const ColorTemp &wb, double pre_mul[3], cmsHPROFILE embedded, cmsHPROFILE camprofile, double cam[3][3], const std::string &camName, const Glib::ustring &fileName);
|
||||||
{
|
|
||||||
colorSpaceConversion_(im, cmp, wb, pre_mul, embedded, camprofile, cam, camName);
|
|
||||||
}
|
|
||||||
static void inverse33(const double (*coeff)[3], double (*icoeff)[3]);
|
static void inverse33(const double (*coeff)[3], double (*icoeff)[3]);
|
||||||
|
|
||||||
void MSR(float** luminance, float **originalLuminance, float **exLuminance, const LUTf& mapcurve, bool mapcontlutili, int width, int height, const procparams::RetinexParams &deh, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax);
|
void MSR(float** luminance, float **originalLuminance, float **exLuminance, const LUTf& mapcurve, bool mapcontlutili, int width, int height, const procparams::RetinexParams &deh, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax);
|
||||||
|
@ -1328,7 +1328,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT
|
|||||||
|
|
||||||
if (isRaw) {
|
if (isRaw) {
|
||||||
double pre_mul[3] = { redMultiplier, greenMultiplier, blueMultiplier };
|
double pre_mul[3] = { redMultiplier, greenMultiplier, blueMultiplier };
|
||||||
RawImageSource::colorSpaceConversion (baseImg, params.icm, currWB, pre_mul, embProfile, camProfile, cam2xyz, camName );
|
RawImageSource::colorSpaceConversion (baseImg, params.icm, currWB, pre_mul, embProfile, camProfile, cam2xyz, camName, metadata->getFileName());
|
||||||
} else {
|
} else {
|
||||||
StdImageSource::colorSpaceConversion (baseImg, params.icm, embProfile, thumbImg->getSampleFormat());
|
StdImageSource::colorSpaceConversion (baseImg, params.icm, embProfile, thumbImg->getSampleFormat());
|
||||||
}
|
}
|
||||||
@ -1467,7 +1467,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT
|
|||||||
|
|
||||||
if (isRaw) {
|
if (isRaw) {
|
||||||
cmsHPROFILE dummy;
|
cmsHPROFILE dummy;
|
||||||
RawImageSource::findInputProfile (params.icm.inputProfile, nullptr, camName, &dcpProf, dummy);
|
RawImageSource::findInputProfile (params.icm.inputProfile, nullptr, camName, metadata->getFileName(), &dcpProf, dummy);
|
||||||
|
|
||||||
if (dcpProf) {
|
if (dcpProf) {
|
||||||
dcpProf->setStep2ApplyState (params.icm.workingProfile, params.icm.toneCurve, params.icm.applyLookTable, params.icm.applyBaselineExposureOffset, as);
|
dcpProf->setStep2ApplyState (params.icm.workingProfile, params.icm.toneCurve, params.icm.applyLookTable, params.icm.applyBaselineExposureOffset, as);
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
*/
|
*/
|
||||||
#include "filecatalog.h"
|
#include "filecatalog.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <iterator>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
@ -347,9 +349,17 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
|
|||||||
bCateg[19] = bOriginal->signal_toggled().connect (sigc::bind(sigc::mem_fun(*this, &FileCatalog::categoryButtonToggled), bOriginal, true));
|
bCateg[19] = bOriginal->signal_toggled().connect (sigc::bind(sigc::mem_fun(*this, &FileCatalog::categoryButtonToggled), bOriginal, true));
|
||||||
bOriginal->signal_button_press_event().connect (sigc::mem_fun(*this, &FileCatalog::capture_event), false);
|
bOriginal->signal_button_press_event().connect (sigc::mem_fun(*this, &FileCatalog::capture_event), false);
|
||||||
|
|
||||||
|
bRecursive = Gtk::manage(new Gtk::ToggleButton());
|
||||||
|
bRecursive->set_image(*Gtk::manage(new RTImage("folder-subfolder", Gtk::ICON_SIZE_LARGE_TOOLBAR)));
|
||||||
|
bRecursive->set_tooltip_text(M("FILEBROWSER_SHOWRECURSIVE"));
|
||||||
|
bRecursive->set_relief(Gtk::RELIEF_NONE);
|
||||||
|
bRecursive->set_active(options.browseRecursive);
|
||||||
|
bRecursive->signal_toggled().connect(sigc::mem_fun(*this, &FileCatalog::showRecursiveToggled));
|
||||||
|
|
||||||
buttonBar->pack_start (*bTrash, Gtk::PACK_SHRINK);
|
buttonBar->pack_start (*bTrash, Gtk::PACK_SHRINK);
|
||||||
buttonBar->pack_start (*bNotTrash, Gtk::PACK_SHRINK);
|
buttonBar->pack_start (*bNotTrash, Gtk::PACK_SHRINK);
|
||||||
buttonBar->pack_start (*bOriginal, Gtk::PACK_SHRINK);
|
buttonBar->pack_start (*bOriginal, Gtk::PACK_SHRINK);
|
||||||
|
buttonBar->pack_start(*bRecursive, Gtk::PACK_SHRINK);
|
||||||
buttonBar->pack_start (*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK);
|
buttonBar->pack_start (*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK);
|
||||||
fileBrowser->trash_changed().connect( sigc::mem_fun(*this, &FileCatalog::trashChanged) );
|
fileBrowser->trash_changed().connect( sigc::mem_fun(*this, &FileCatalog::trashChanged) );
|
||||||
|
|
||||||
@ -541,9 +551,7 @@ void FileCatalog::closeDir ()
|
|||||||
exportPanel->set_sensitive (false);
|
exportPanel->set_sensitive (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dirMonitor) {
|
dirMonitors.clear();
|
||||||
dirMonitor->cancel ();
|
|
||||||
}
|
|
||||||
|
|
||||||
// ignore old requests
|
// ignore old requests
|
||||||
++selectedDirectoryId;
|
++selectedDirectoryId;
|
||||||
@ -567,60 +575,82 @@ void FileCatalog::closeDir ()
|
|||||||
redrawAll ();
|
redrawAll ();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<Glib::ustring> FileCatalog::getFileList()
|
std::vector<Glib::ustring> FileCatalog::getFileList(std::vector<Glib::RefPtr<Gio::File>> *dirs_explored)
|
||||||
{
|
{
|
||||||
|
|
||||||
std::vector<Glib::ustring> names;
|
std::vector<Glib::ustring> names;
|
||||||
|
|
||||||
const std::set<std::string>& extensions = options.parsedExtensionsSet;
|
const std::set<std::string>& extensions = options.parsedExtensionsSet;
|
||||||
|
|
||||||
try {
|
static void (*getFilesRecursively)(const Glib::ustring &, int, int &, std::vector<Glib::ustring> &, std::vector<Glib::RefPtr<Gio::File>> *) = [](const Glib::ustring &dir_path, int max_depth, int &dir_quota, std::vector<Glib::ustring> &file_names, std::vector<Glib::RefPtr<Gio::File>> * directories_explored) {
|
||||||
|
try {
|
||||||
|
|
||||||
const auto dir = Gio::File::create_for_path(selectedDirectory);
|
const auto dir = Gio::File::create_for_path(dir_path);
|
||||||
|
|
||||||
auto enumerator = dir->enumerate_children("standard::name,standard::type,standard::is-hidden");
|
static const auto enumerate_attrs =
|
||||||
|
std::string(G_FILE_ATTRIBUTE_STANDARD_NAME) + "," +
|
||||||
|
G_FILE_ATTRIBUTE_STANDARD_TYPE + "," +
|
||||||
|
G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN + "," +
|
||||||
|
G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET;
|
||||||
|
auto enumerator = dir->enumerate_children(
|
||||||
|
enumerate_attrs,
|
||||||
|
options.browseRecursiveFollowLinks
|
||||||
|
? Gio::FileQueryInfoFlags::FILE_QUERY_INFO_NONE
|
||||||
|
: Gio::FileQueryInfoFlags::FILE_QUERY_INFO_NOFOLLOW_SYMLINKS);
|
||||||
|
|
||||||
while (true) {
|
if (directories_explored) {
|
||||||
try {
|
directories_explored->push_back(dir);
|
||||||
const auto file = enumerator->next_file();
|
}
|
||||||
if (!file) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (file->get_file_type() == Gio::FILE_TYPE_DIRECTORY) {
|
while (true) {
|
||||||
continue;
|
try {
|
||||||
}
|
const auto file = enumerator->next_file();
|
||||||
|
if (!file) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (!options.fbShowHidden && file->is_hidden()) {
|
if (!options.fbShowHidden && file->is_hidden()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Glib::ustring fname = file->get_name();
|
if (file->get_file_type() == Gio::FILE_TYPE_DIRECTORY) {
|
||||||
const auto lastdot = fname.find_last_of('.');
|
if (max_depth > 0 && dir_quota > 0) {
|
||||||
|
const Glib::ustring child_dir_path = Glib::build_filename(dir_path, file->get_name());
|
||||||
|
getFilesRecursively(child_dir_path, max_depth - 1, --dir_quota, file_names, directories_explored);
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (lastdot >= fname.length() - 1) {
|
const Glib::ustring fname = file->get_name();
|
||||||
continue;
|
const auto lastdot = fname.find_last_of('.');
|
||||||
}
|
|
||||||
|
|
||||||
if (extensions.find(fname.substr(lastdot + 1).lowercase()) == extensions.end()) {
|
if (lastdot >= fname.length() - 1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
names.push_back(Glib::build_filename(selectedDirectory, fname));
|
if (extensions.find(fname.substr(lastdot + 1).lowercase()) == extensions.end()) {
|
||||||
} catch (Glib::Exception& exception) {
|
continue;
|
||||||
if (rtengine::settings->verbose) {
|
}
|
||||||
std::cerr << exception.what() << std::endl;
|
|
||||||
|
file_names.emplace_back(Glib::build_filename(dir_path, fname));
|
||||||
|
} catch (Glib::Exception& exception) {
|
||||||
|
if (rtengine::settings->verbose) {
|
||||||
|
std::cerr << exception.what() << std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} catch (Glib::Exception& exception) {
|
||||||
|
|
||||||
|
if (rtengine::settings->verbose) {
|
||||||
|
std::cerr << "Failed to list directory \"" << dir_path << "\": " << exception.what() << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
} catch (Glib::Exception& exception) {
|
int dirs_left = options.browseRecursive ? options.browseRecursiveMaxDirs : 0;
|
||||||
|
getFilesRecursively(selectedDirectory, options.browseRecursiveDepth, dirs_left, names, dirs_explored);
|
||||||
if (rtengine::settings->verbose) {
|
|
||||||
std::cerr << "Failed to list directory \"" << selectedDirectory << "\": " << exception.what() << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return names;
|
return names;
|
||||||
}
|
}
|
||||||
@ -646,9 +676,10 @@ void FileCatalog::dirSelected (const Glib::ustring& dirname, const Glib::ustring
|
|||||||
|
|
||||||
selectedDirectory = dir->get_parse_name();
|
selectedDirectory = dir->get_parse_name();
|
||||||
|
|
||||||
|
std::vector<Glib::RefPtr<Gio::File>> allDirs;
|
||||||
BrowsePath->set_text(selectedDirectory);
|
BrowsePath->set_text(selectedDirectory);
|
||||||
buttonBrowsePath->set_image(*iRefreshWhite);
|
buttonBrowsePath->set_image(*iRefreshWhite);
|
||||||
fileNameList = getFileList();
|
fileNameList = getFileList(&allDirs);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < fileNameList.size(); i++) {
|
for (unsigned int i = 0; i < fileNameList.size(); i++) {
|
||||||
if (openfile.empty() || fileNameList[i] != openfile) { // if we opened a file at the beginning don't add it again
|
if (openfile.empty() || fileNameList[i] != openfile) { // if we opened a file at the beginning don't add it again
|
||||||
@ -664,13 +695,45 @@ void FileCatalog::dirSelected (const Glib::ustring& dirname, const Glib::ustring
|
|||||||
filepanel->loadingThumbs(M("PROGRESSBAR_LOADINGTHUMBS"), 0);
|
filepanel->loadingThumbs(M("PROGRESSBAR_LOADINGTHUMBS"), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
dirMonitor = dir->monitor_directory ();
|
refreshDirectoryMonitors(allDirs);
|
||||||
dirMonitor->signal_changed().connect (sigc::bind(sigc::mem_fun(*this, &FileCatalog::on_dir_changed), false));
|
|
||||||
} catch (Glib::Exception& ex) {
|
} catch (Glib::Exception& ex) {
|
||||||
std::cout << ex.what();
|
std::cout << ex.what();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FileCatalog::refreshDirectoryMonitors(const std::vector<Glib::RefPtr<Gio::File>> &dirs_to_monitor)
|
||||||
|
{
|
||||||
|
std::vector<Glib::ustring> updated_dir_names;
|
||||||
|
std::transform(
|
||||||
|
dirs_to_monitor.cbegin(), dirs_to_monitor.cend(),
|
||||||
|
std::back_inserter(updated_dir_names),
|
||||||
|
[](const Glib::RefPtr<Gio::File> &updated_dir) { return updated_dir->get_path(); });
|
||||||
|
|
||||||
|
// Remove monitors on directories that are no longer shown.
|
||||||
|
dirMonitors.erase(
|
||||||
|
std::remove_if(dirMonitors.begin(), dirMonitors.end(),
|
||||||
|
[&updated_dir_names](const FileMonitorInfo &fileMonitorInfo) {
|
||||||
|
return std::find(updated_dir_names.cbegin(), updated_dir_names.cend(), fileMonitorInfo.filePath) == updated_dir_names.cend();
|
||||||
|
}),
|
||||||
|
dirMonitors.end());
|
||||||
|
|
||||||
|
// Add monitors that do not exist yet.
|
||||||
|
std::vector<Glib::ustring> monitored_dir_names;
|
||||||
|
std::transform(
|
||||||
|
dirMonitors.cbegin(), dirMonitors.cend(),
|
||||||
|
std::back_inserter(monitored_dir_names),
|
||||||
|
[](const FileMonitorInfo &dir_monitor) { return dir_monitor.filePath; });
|
||||||
|
for (const auto &dir_to_monitor : dirs_to_monitor) {
|
||||||
|
const auto dir_path = dir_to_monitor->get_path();
|
||||||
|
if (std::find(monitored_dir_names.cbegin(), monitored_dir_names.cend(), dir_path) != monitored_dir_names.cend()) {
|
||||||
|
continue; // A monitor exists already.
|
||||||
|
}
|
||||||
|
auto dir_monitor = dir_to_monitor->monitor_directory();
|
||||||
|
dir_monitor->signal_changed().connect(sigc::bind(sigc::mem_fun(*this, &FileCatalog::on_dir_changed), false));
|
||||||
|
dirMonitors.emplace_back(dir_monitor, dir_path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void FileCatalog::enableTabMode(bool enable)
|
void FileCatalog::enableTabMode(bool enable)
|
||||||
{
|
{
|
||||||
inTabMode = enable;
|
inTabMode = enable;
|
||||||
@ -1579,6 +1642,12 @@ void FileCatalog::categoryButtonToggled (Gtk::ToggleButton* b, bool isMouseClick
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FileCatalog::showRecursiveToggled()
|
||||||
|
{
|
||||||
|
options.browseRecursive = bRecursive->get_active();
|
||||||
|
reparseDirectory();
|
||||||
|
}
|
||||||
|
|
||||||
BrowserFilter FileCatalog::getFilter ()
|
BrowserFilter FileCatalog::getFilter ()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1712,21 +1781,28 @@ void FileCatalog::reparseDirectory ()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if a thumbnailed file has been deleted
|
// check if a thumbnailed file has been deleted or is not in a directory of interest
|
||||||
const std::vector<ThumbBrowserEntryBase*>& t = fileBrowser->getEntries();
|
const std::vector<ThumbBrowserEntryBase*>& t = fileBrowser->getEntries();
|
||||||
std::vector<Glib::ustring> fileNamesToDel;
|
std::vector<Glib::ustring> fileNamesToDel;
|
||||||
|
std::vector<Glib::ustring> fileNamesToRemove;
|
||||||
|
|
||||||
for (const auto& entry : t) {
|
for (const auto& entry : t) {
|
||||||
if (!Glib::file_test(entry->filename, Glib::FILE_TEST_EXISTS)) {
|
if (!Glib::file_test(entry->filename, Glib::FILE_TEST_EXISTS)) {
|
||||||
fileNamesToDel.push_back(entry->filename);
|
fileNamesToDel.push_back(entry->filename);
|
||||||
|
fileNamesToRemove.push_back(entry->filename);
|
||||||
|
}
|
||||||
|
else if (!options.browseRecursive && Glib::path_get_dirname(entry->filename) != selectedDirectory) {
|
||||||
|
fileNamesToRemove.push_back(entry->filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto& toDelete : fileNamesToDel) {
|
for (const auto& toRemove : fileNamesToRemove) {
|
||||||
delete fileBrowser->delEntry(toDelete);
|
delete fileBrowser->delEntry(toRemove);
|
||||||
cacheMgr->deleteEntry(toDelete);
|
|
||||||
--previewsLoaded;
|
--previewsLoaded;
|
||||||
}
|
}
|
||||||
|
for (const auto& toDelete : fileNamesToDel) {
|
||||||
|
cacheMgr->deleteEntry(toDelete);
|
||||||
|
}
|
||||||
|
|
||||||
if (!fileNamesToDel.empty()) {
|
if (!fileNamesToDel.empty()) {
|
||||||
_refreshProgressBar();
|
_refreshProgressBar();
|
||||||
@ -1739,7 +1815,8 @@ void FileCatalog::reparseDirectory ()
|
|||||||
oldNames.insert(oldName.collate_key());
|
oldNames.insert(oldName.collate_key());
|
||||||
}
|
}
|
||||||
|
|
||||||
fileNameList = getFileList();
|
std::vector<Glib::RefPtr<Gio::File>> allDirs;
|
||||||
|
fileNameList = getFileList(&allDirs);
|
||||||
for (const auto& newName : fileNameList) {
|
for (const auto& newName : fileNameList) {
|
||||||
if (oldNames.find(newName.collate_key()) == oldNames.end()) {
|
if (oldNames.find(newName.collate_key()) == oldNames.end()) {
|
||||||
addFile(newName);
|
addFile(newName);
|
||||||
@ -1747,13 +1824,16 @@ void FileCatalog::reparseDirectory ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
refreshDirectoryMonitors(allDirs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileCatalog::on_dir_changed (const Glib::RefPtr<Gio::File>& file, const Glib::RefPtr<Gio::File>& other_file, Gio::FileMonitorEvent event_type, bool internal)
|
void FileCatalog::on_dir_changed (const Glib::RefPtr<Gio::File>& file, const Glib::RefPtr<Gio::File>& other_file, Gio::FileMonitorEvent event_type, bool internal)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (options.has_retained_extention(file->get_parse_name())
|
if ((options.has_retained_extention(file->get_parse_name())
|
||||||
&& (event_type == Gio::FILE_MONITOR_EVENT_CREATED || event_type == Gio::FILE_MONITOR_EVENT_DELETED || event_type == Gio::FILE_MONITOR_EVENT_CHANGED)) {
|
&& (event_type == Gio::FILE_MONITOR_EVENT_CREATED || event_type == Gio::FILE_MONITOR_EVENT_DELETED || event_type == Gio::FILE_MONITOR_EVENT_CHANGED))
|
||||||
|
|| (event_type == Gio::FILE_MONITOR_EVENT_CREATED && Glib::file_test(file->get_path(), Glib::FileTest::FILE_TEST_IS_DIR))
|
||||||
|
|| (event_type == Gio::FILE_MONITOR_EVENT_DELETED && std::find_if(dirMonitors.cbegin(), dirMonitors.cend(), [&file](const FileMonitorInfo &monitor) { return monitor.filePath == file->get_path(); }) != dirMonitors.cend())) {
|
||||||
if (!internal) {
|
if (!internal) {
|
||||||
GThreadLock lock;
|
GThreadLock lock;
|
||||||
reparseDirectory ();
|
reparseDirectory ();
|
||||||
|
@ -54,6 +54,13 @@ public:
|
|||||||
typedef sigc::slot<void, const Glib::ustring&> DirSelectionSlot;
|
typedef sigc::slot<void, const Glib::ustring&> DirSelectionSlot;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
struct FileMonitorInfo {
|
||||||
|
FileMonitorInfo(const Glib::RefPtr<Gio::FileMonitor> &file_monitor, const Glib::ustring &file_path) :
|
||||||
|
fileMonitor(file_monitor), filePath(file_path) {}
|
||||||
|
Glib::RefPtr<Gio::FileMonitor> fileMonitor;
|
||||||
|
Glib::ustring filePath;
|
||||||
|
};
|
||||||
|
|
||||||
FilePanel* filepanel;
|
FilePanel* filepanel;
|
||||||
Gtk::Box* hBox;
|
Gtk::Box* hBox;
|
||||||
Glib::ustring selectedDirectory;
|
Glib::ustring selectedDirectory;
|
||||||
@ -95,6 +102,7 @@ private:
|
|||||||
Gtk::ToggleButton* bTrash;
|
Gtk::ToggleButton* bTrash;
|
||||||
Gtk::ToggleButton* bNotTrash;
|
Gtk::ToggleButton* bNotTrash;
|
||||||
Gtk::ToggleButton* bOriginal;
|
Gtk::ToggleButton* bOriginal;
|
||||||
|
Gtk::ToggleButton* bRecursive;
|
||||||
Gtk::ToggleButton* categoryButtons[20];
|
Gtk::ToggleButton* categoryButtons[20];
|
||||||
Gtk::ToggleButton* exifInfo;
|
Gtk::ToggleButton* exifInfo;
|
||||||
sigc::connection bCateg[20];
|
sigc::connection bCateg[20];
|
||||||
@ -143,14 +151,15 @@ private:
|
|||||||
std::set<Glib::ustring> editedFiles;
|
std::set<Glib::ustring> editedFiles;
|
||||||
guint modifierKey; // any modifiers held when rank button was pressed
|
guint modifierKey; // any modifiers held when rank button was pressed
|
||||||
|
|
||||||
Glib::RefPtr<Gio::FileMonitor> dirMonitor;
|
std::vector<FileMonitorInfo> dirMonitors;
|
||||||
|
|
||||||
IdleRegister idle_register;
|
IdleRegister idle_register;
|
||||||
|
|
||||||
void addAndOpenFile (const Glib::ustring& fname);
|
void addAndOpenFile (const Glib::ustring& fname);
|
||||||
void addFile (const Glib::ustring& fName);
|
void addFile (const Glib::ustring& fName);
|
||||||
std::vector<Glib::ustring> getFileList ();
|
std::vector<Glib::ustring> getFileList(std::vector<Glib::RefPtr<Gio::File>> *dirs_explored = nullptr);
|
||||||
BrowserFilter getFilter ();
|
BrowserFilter getFilter ();
|
||||||
|
void refreshDirectoryMonitors(const std::vector<Glib::RefPtr<Gio::File>> &dirs_to_monitor);
|
||||||
void trashChanged ();
|
void trashChanged ();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -240,6 +249,7 @@ public:
|
|||||||
void setExportPanel (ExportPanel* expanel);
|
void setExportPanel (ExportPanel* expanel);
|
||||||
void exifInfoButtonToggled();
|
void exifInfoButtonToggled();
|
||||||
void categoryButtonToggled (Gtk::ToggleButton* b, bool isMouseClick);
|
void categoryButtonToggled (Gtk::ToggleButton* b, bool isMouseClick);
|
||||||
|
void showRecursiveToggled();
|
||||||
bool capture_event(GdkEventButton* event);
|
bool capture_event(GdkEventButton* event);
|
||||||
void filterChanged ();
|
void filterChanged ();
|
||||||
void runFilterDialog ();
|
void runFilterDialog ();
|
||||||
|
@ -705,6 +705,8 @@ void ICMPanel::updateDCP(int dcpIlluminant, Glib::ustring dcp_name)
|
|||||||
|
|
||||||
if (dcp_name == "(cameraICC)") {
|
if (dcp_name == "(cameraICC)") {
|
||||||
dcp = DCPStore::getInstance()->getStdProfile(camName);
|
dcp = DCPStore::getInstance()->getStdProfile(camName);
|
||||||
|
} else if (dcp_name == "(embedded)") {
|
||||||
|
dcp = DCPStore::getInstance()->getProfile(filename);
|
||||||
} else if (ifromfile->get_active() && DCPStore::getInstance()->isValidDCPFileName(dcp_name)) {
|
} else if (ifromfile->get_active() && DCPStore::getInstance()->isValidDCPFileName(dcp_name)) {
|
||||||
dcp = DCPStore::getInstance()->getProfile(dcp_name);
|
dcp = DCPStore::getInstance()->getProfile(dcp_name);
|
||||||
}
|
}
|
||||||
@ -806,8 +808,8 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
|
|||||||
ConnectionBlocker wprimconn_(wprimconn);
|
ConnectionBlocker wprimconn_(wprimconn);
|
||||||
trcExp->set_expanded(false);
|
trcExp->set_expanded(false);
|
||||||
|
|
||||||
if (pp->icm.inputProfile.substr(0, 5) != "file:") {
|
if (pp->icm.inputProfile.substr(0, 5) != "file:" && !ipDialog->get_filename().empty()) {
|
||||||
ipDialog->set_filename(" ");
|
ipDialog->set_filename(pp->icm.inputProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pp->icm.inputProfile == "(none)") {
|
if (pp->icm.inputProfile == "(none)") {
|
||||||
@ -815,7 +817,7 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
|
|||||||
updateDCP(pp->icm.dcpIlluminant, "");
|
updateDCP(pp->icm.dcpIlluminant, "");
|
||||||
} else if (pp->icm.inputProfile == "(embedded)" || ((pp->icm.inputProfile == "(camera)" || pp->icm.inputProfile.empty()) && icamera->get_state() == Gtk::STATE_INSENSITIVE)) {
|
} else if (pp->icm.inputProfile == "(embedded)" || ((pp->icm.inputProfile == "(camera)" || pp->icm.inputProfile.empty()) && icamera->get_state() == Gtk::STATE_INSENSITIVE)) {
|
||||||
iembedded->set_active(true);
|
iembedded->set_active(true);
|
||||||
updateDCP(pp->icm.dcpIlluminant, "");
|
updateDCP(pp->icm.dcpIlluminant, "(embedded)");
|
||||||
} else if ((pp->icm.inputProfile == "(cameraICC)") && icameraICC->get_state() != Gtk::STATE_INSENSITIVE) {
|
} else if ((pp->icm.inputProfile == "(cameraICC)") && icameraICC->get_state() != Gtk::STATE_INSENSITIVE) {
|
||||||
icameraICC->set_active(true);
|
icameraICC->set_active(true);
|
||||||
updateDCP(pp->icm.dcpIlluminant, "(cameraICC)");
|
updateDCP(pp->icm.dcpIlluminant, "(cameraICC)");
|
||||||
@ -2126,8 +2128,9 @@ void ICMPanel::setRawMeta(bool raw, const rtengine::FramesData* pMeta)
|
|||||||
iembedded->set_active(!raw);
|
iembedded->set_active(!raw);
|
||||||
icamera->set_sensitive(raw);
|
icamera->set_sensitive(raw);
|
||||||
camName = pMeta->getCamera();
|
camName = pMeta->getCamera();
|
||||||
|
filename = pMeta->getFileName();
|
||||||
icameraICC->set_sensitive(raw && (ICCStore::getInstance()->getStdProfile(pMeta->getCamera()) != nullptr || DCPStore::getInstance()->getStdProfile(pMeta->getCamera()) != nullptr));
|
icameraICC->set_sensitive(raw && (ICCStore::getInstance()->getStdProfile(pMeta->getCamera()) != nullptr || DCPStore::getInstance()->getStdProfile(pMeta->getCamera()) != nullptr));
|
||||||
iembedded->set_sensitive(!raw);
|
iembedded->set_sensitive(!raw || DCPStore::getInstance()->getProfile(filename));
|
||||||
|
|
||||||
enableListener();
|
enableListener();
|
||||||
}
|
}
|
||||||
|
@ -167,6 +167,7 @@ private:
|
|||||||
double dcpTemperatures[2];
|
double dcpTemperatures[2];
|
||||||
Glib::ustring lastRefFilename;
|
Glib::ustring lastRefFilename;
|
||||||
Glib::ustring camName;
|
Glib::ustring camName;
|
||||||
|
Glib::ustring filename;
|
||||||
void updateDCP(int dcpIlluminant, Glib::ustring dcp_name);
|
void updateDCP(int dcpIlluminant, Glib::ustring dcp_name);
|
||||||
void updateRenderingIntent(const Glib::ustring &profile);
|
void updateRenderingIntent(const Glib::ustring &profile);
|
||||||
void foldAllButMe (GdkEventButton* event, MyExpander *expander);
|
void foldAllButMe (GdkEventButton* event, MyExpander *expander);
|
||||||
|
@ -435,6 +435,10 @@ void Options::setDefaults()
|
|||||||
parseExtensionsEnabled.clear();
|
parseExtensionsEnabled.clear();
|
||||||
parsedExtensions.clear();
|
parsedExtensions.clear();
|
||||||
parsedExtensionsSet.clear();
|
parsedExtensionsSet.clear();
|
||||||
|
browseRecursive = false;
|
||||||
|
browseRecursiveDepth = 10;
|
||||||
|
browseRecursiveMaxDirs = 100;
|
||||||
|
browseRecursiveFollowLinks = true;
|
||||||
renameUseTemplates = false;
|
renameUseTemplates = false;
|
||||||
renameTemplates.clear();
|
renameTemplates.clear();
|
||||||
thumbnailZoomRatios.clear();
|
thumbnailZoomRatios.clear();
|
||||||
@ -1346,6 +1350,22 @@ void Options::readFromFile(Glib::ustring fname)
|
|||||||
if (keyFile.has_key("File Browser", "SortDescending")) {
|
if (keyFile.has_key("File Browser", "SortDescending")) {
|
||||||
sortDescending = keyFile.get_boolean("File Browser", "SortDescending");
|
sortDescending = keyFile.get_boolean("File Browser", "SortDescending");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (keyFile.has_key("File Browser", "BrowseRecursive")) {
|
||||||
|
browseRecursive = keyFile.get_boolean("File Browser", "BrowseRecursive");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keyFile.has_key("File Browser", "BrowseRecursiveDepth")) {
|
||||||
|
browseRecursiveDepth = keyFile.get_integer("File Browser", "BrowseRecursiveDepth");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keyFile.has_key("File Browser", "BrowseRecursiveMaxDirs")) {
|
||||||
|
browseRecursiveMaxDirs = keyFile.get_integer("File Browser", "BrowseRecursiveMaxDirs");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keyFile.has_key("File Browser", "BrowseRecursiveFollowLinks")) {
|
||||||
|
browseRecursiveFollowLinks = keyFile.get_boolean("File Browser", "BrowseRecursiveFollowLinks");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keyFile.has_group("Clipping Indication")) {
|
if (keyFile.has_group("Clipping Indication")) {
|
||||||
@ -2444,6 +2464,10 @@ void Options::saveToFile(Glib::ustring fname)
|
|||||||
}
|
}
|
||||||
keyFile.set_integer("File Browser", "SortMethod", sortMethod);
|
keyFile.set_integer("File Browser", "SortMethod", sortMethod);
|
||||||
keyFile.set_boolean("File Browser", "SortDescending", sortDescending);
|
keyFile.set_boolean("File Browser", "SortDescending", sortDescending);
|
||||||
|
keyFile.set_boolean("File Browser", "BrowseRecursive", browseRecursive);
|
||||||
|
keyFile.set_integer("File Browser", "BrowseRecursiveDepth", browseRecursiveDepth);
|
||||||
|
keyFile.set_integer("File Browser", "BrowseRecursiveMaxDirs", browseRecursiveMaxDirs);
|
||||||
|
keyFile.set_boolean("File Browser", "BrowseRecursiveFollowLinks", browseRecursiveFollowLinks);
|
||||||
keyFile.set_integer("Clipping Indication", "HighlightThreshold", highlightThreshold);
|
keyFile.set_integer("Clipping Indication", "HighlightThreshold", highlightThreshold);
|
||||||
keyFile.set_integer("Clipping Indication", "ShadowThreshold", shadowThreshold);
|
keyFile.set_integer("Clipping Indication", "ShadowThreshold", shadowThreshold);
|
||||||
keyFile.set_boolean("Clipping Indication", "BlinkClipped", blinkClipped);
|
keyFile.set_boolean("Clipping Indication", "BlinkClipped", blinkClipped);
|
||||||
|
@ -314,6 +314,10 @@ public:
|
|||||||
std::vector<int> parseExtensionsEnabled; // List of bool to retain extension or not
|
std::vector<int> parseExtensionsEnabled; // List of bool to retain extension or not
|
||||||
std::vector<Glib::ustring> parsedExtensions; // List containing all retained extensions (lowercase)
|
std::vector<Glib::ustring> parsedExtensions; // List containing all retained extensions (lowercase)
|
||||||
std::set<std::string> parsedExtensionsSet; // Set containing all retained extensions (lowercase)
|
std::set<std::string> parsedExtensionsSet; // Set containing all retained extensions (lowercase)
|
||||||
|
bool browseRecursive;
|
||||||
|
int browseRecursiveDepth;
|
||||||
|
int browseRecursiveMaxDirs;
|
||||||
|
bool browseRecursiveFollowLinks;
|
||||||
std::vector<int> tpOpen;
|
std::vector<int> tpOpen;
|
||||||
bool autoSaveTpOpen;
|
bool autoSaveTpOpen;
|
||||||
//std::vector<int> crvOpen;
|
//std::vector<int> crvOpen;
|
||||||
|
@ -1481,6 +1481,28 @@ Gtk::Widget* Preferences::getFileBrowserPanel()
|
|||||||
maxRecentFolders->set_range(1, 25);
|
maxRecentFolders->set_range(1, 25);
|
||||||
vbro->pack_start(*hbrecent, Gtk::PACK_SHRINK, 4);
|
vbro->pack_start(*hbrecent, Gtk::PACK_SHRINK, 4);
|
||||||
|
|
||||||
|
// Recursive browsing options.
|
||||||
|
Gtk::Box *hbBrowseRecursive = Gtk::manage(new Gtk::Box());
|
||||||
|
Gtk::Label *labBrowseRecursiveDepth = Gtk::manage(new Gtk::Label(M("PREFERENCES_BROWSERECURSIVEDEPTH") + ":"));
|
||||||
|
browseRecursiveDepth = Gtk::manage(new Gtk::SpinButton());
|
||||||
|
browseRecursiveDepth->set_digits(0);
|
||||||
|
browseRecursiveDepth->set_increments(1, 5);
|
||||||
|
browseRecursiveDepth->set_range(1, 999);
|
||||||
|
Gtk::Label *labBrowseRecursiveMaxDirs = Gtk::manage(new Gtk::Label(M("PREFERENCES_BROWSERECURSIVEMAXDIRS") + ":"));
|
||||||
|
browseRecursiveMaxDirs = Gtk::manage(new Gtk::SpinButton());
|
||||||
|
browseRecursiveMaxDirs->set_digits(0);
|
||||||
|
browseRecursiveMaxDirs->set_increments(1, 5);
|
||||||
|
browseRecursiveMaxDirs->set_range(1, 999);
|
||||||
|
hbBrowseRecursive->pack_start(*labBrowseRecursiveDepth, Gtk::PACK_SHRINK, 4);
|
||||||
|
hbBrowseRecursive->pack_start(*browseRecursiveDepth, Gtk::PACK_SHRINK, 4);
|
||||||
|
hbBrowseRecursive->pack_start(*labBrowseRecursiveMaxDirs, Gtk::PACK_SHRINK, 4);
|
||||||
|
hbBrowseRecursive->pack_start(*browseRecursiveMaxDirs, Gtk::PACK_SHRINK, 4);
|
||||||
|
vbro->pack_start(*hbBrowseRecursive, Gtk::PACK_SHRINK, 0);
|
||||||
|
#ifndef _WIN32
|
||||||
|
browseRecursiveFollowLinks = Gtk::manage(new Gtk::CheckButton(M("PREFERENCES_BROWSERECURSIVEFOLLOWLINKS")));
|
||||||
|
vbro->pack_start(*browseRecursiveFollowLinks, Gtk::PACK_SHRINK, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
fro->add(*vbro);
|
fro->add(*vbro);
|
||||||
|
|
||||||
|
|
||||||
@ -1937,6 +1959,11 @@ void Preferences::storePreferences()
|
|||||||
moptions.filmStripOverlayedFileNames = filmStripOverlayedFileNames->get_active();
|
moptions.filmStripOverlayedFileNames = filmStripOverlayedFileNames->get_active();
|
||||||
moptions.sameThumbSize = sameThumbSize->get_active();
|
moptions.sameThumbSize = sameThumbSize->get_active();
|
||||||
moptions.internalThumbIfUntouched = ckbInternalThumbIfUntouched->get_active();
|
moptions.internalThumbIfUntouched = ckbInternalThumbIfUntouched->get_active();
|
||||||
|
moptions.browseRecursiveDepth = static_cast<int>(browseRecursiveDepth->get_value());
|
||||||
|
moptions.browseRecursiveMaxDirs = static_cast<int>(browseRecursiveMaxDirs->get_value());
|
||||||
|
if (browseRecursiveFollowLinks) {
|
||||||
|
moptions.browseRecursiveFollowLinks = browseRecursiveFollowLinks->get_active();
|
||||||
|
}
|
||||||
|
|
||||||
auto save_where = saveParamsPreference->get_active_row_number();
|
auto save_where = saveParamsPreference->get_active_row_number();
|
||||||
moptions.saveParamsFile = save_where == 0 || save_where == 2;
|
moptions.saveParamsFile = save_where == 0 || save_where == 2;
|
||||||
@ -2166,6 +2193,11 @@ void Preferences::fillPreferences()
|
|||||||
filmStripOverlayedFileNames->set_active(moptions.filmStripOverlayedFileNames);
|
filmStripOverlayedFileNames->set_active(moptions.filmStripOverlayedFileNames);
|
||||||
sameThumbSize->set_active(moptions.sameThumbSize);
|
sameThumbSize->set_active(moptions.sameThumbSize);
|
||||||
ckbInternalThumbIfUntouched->set_active(moptions.internalThumbIfUntouched);
|
ckbInternalThumbIfUntouched->set_active(moptions.internalThumbIfUntouched);
|
||||||
|
browseRecursiveDepth->set_value(moptions.browseRecursiveDepth);
|
||||||
|
browseRecursiveMaxDirs->set_value(moptions.browseRecursiveMaxDirs);
|
||||||
|
if (browseRecursiveFollowLinks) {
|
||||||
|
browseRecursiveFollowLinks->set_active(moptions.browseRecursiveFollowLinks);
|
||||||
|
}
|
||||||
|
|
||||||
saveParamsPreference->set_active(moptions.saveParamsFile ? (moptions.saveParamsCache ? 2 : 0) : 1);
|
saveParamsPreference->set_active(moptions.saveParamsFile ? (moptions.saveParamsCache ? 2 : 0) : 1);
|
||||||
|
|
||||||
|
@ -186,6 +186,9 @@ class Preferences final :
|
|||||||
Gtk::CheckButton* overlayedFileNames;
|
Gtk::CheckButton* overlayedFileNames;
|
||||||
Gtk::CheckButton* filmStripOverlayedFileNames;
|
Gtk::CheckButton* filmStripOverlayedFileNames;
|
||||||
Gtk::CheckButton* sameThumbSize;
|
Gtk::CheckButton* sameThumbSize;
|
||||||
|
Gtk::SpinButton* browseRecursiveDepth;
|
||||||
|
Gtk::SpinButton* browseRecursiveMaxDirs;
|
||||||
|
Gtk::CheckButton* browseRecursiveFollowLinks{nullptr};
|
||||||
|
|
||||||
Gtk::SpinButton* threadsSpinBtn;
|
Gtk::SpinButton* threadsSpinBtn;
|
||||||
Gtk::SpinButton* clutCacheSizeSB;
|
Gtk::SpinButton* clutCacheSizeSB;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user