Skip to content

Commit 9f5cbc2

Browse files
control_log missing icc profiles
If we set input,output or work profile to a icc file profile we should report if the file was not available and report that. This is only done while calculating preview pipe to avoid repeating messages.
1 parent b1568f3 commit 9f5cbc2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/common/iop_profile.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "common/debug.h"
2323
#include "common/imagebuf.h"
2424
#include "common/matrices.h"
25+
#include "control/control.h"
2526
#include "develop/imageop.h"
2627
#include "develop/imageop_math.h"
2728
#include "develop/pixelpipe.h"
@@ -878,6 +879,9 @@ dt_ioppr_set_pipe_work_profile_info(struct dt_develop_t *dev,
878879
dt_iop_order_iccprofile_info_t *profile_info =
879880
dt_ioppr_add_profile_info_to_list(dev, type, filename, intent);
880881

882+
if(!profile_info && (pipe->type & DT_DEV_PIXELPIPE_PREVIEW) && (type == DT_COLORSPACE_FILE))
883+
dt_control_log(_("work icc profile '%s' missing"), filename);
884+
881885
if(profile_info == NULL
882886
|| !dt_is_valid_colormatrix(profile_info->matrix_in[0][0])
883887
|| !dt_is_valid_colormatrix(profile_info->matrix_out[0][0]))
@@ -906,6 +910,9 @@ dt_ioppr_set_pipe_input_profile_info(struct dt_develop_t *dev,
906910

907911
if(profile_info == NULL)
908912
{
913+
if((pipe->type & DT_DEV_PIXELPIPE_PREVIEW) && (type == DT_COLORSPACE_FILE))
914+
dt_control_log(_("input icc profile '%s' missing"), filename);
915+
909916
dt_print(DT_DEBUG_PIPE,
910917
"[dt_ioppr_set_pipe_input_profile_info] profile `%s' in `%s'"
911918
" replaced by linear Rec2020",
@@ -939,6 +946,9 @@ dt_ioppr_set_pipe_output_profile_info(struct dt_develop_t *dev,
939946
dt_iop_order_iccprofile_info_t *profile_info =
940947
dt_ioppr_add_profile_info_to_list(dev, type, filename, intent);
941948

949+
if(!profile_info && (pipe->type & DT_DEV_PIXELPIPE_PREVIEW) && (type == DT_COLORSPACE_FILE))
950+
dt_control_log(_("output icc profile '%s' missing"), filename);
951+
942952
if(profile_info == NULL
943953
|| !dt_is_valid_colormatrix(profile_info->matrix_in[0][0])
944954
|| !dt_is_valid_colormatrix(profile_info->matrix_out[0][0]))

0 commit comments

Comments
 (0)