From 6ca0ecf193d01a5e851df355ec51a52bc0e1b6b0 Mon Sep 17 00:00:00 2001 From: David Capello Date: Tue, 23 Oct 2018 16:15:31 -0300 Subject: [PATCH] Don't convert colors if color management is disabled (#1576) --- src/app/color_spaces.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/app/color_spaces.cpp b/src/app/color_spaces.cpp index 835b3c92c..375507345 100644 --- a/src/app/color_spaces.cpp +++ b/src/app/color_spaces.cpp @@ -54,16 +54,20 @@ gfx::ColorSpacePtr get_working_rgb_space_from_preferences() ConvertCS::ConvertCS() { - auto srcCS = get_current_color_space(); - auto dstCS = get_screen_color_space(); - if (srcCS && dstCS) - m_conversion = os::instance()->convertBetweenColorSpace(srcCS, dstCS); + if (Preferences::instance().color.manage()) { + auto srcCS = get_current_color_space(); + auto dstCS = get_screen_color_space(); + if (srcCS && dstCS) + m_conversion = os::instance()->convertBetweenColorSpace(srcCS, dstCS); + } } ConvertCS::ConvertCS(const os::ColorSpacePtr& srcCS, const os::ColorSpacePtr& dstCS) { - m_conversion = os::instance()->convertBetweenColorSpace(srcCS, dstCS); + if (Preferences::instance().color.manage()) { + m_conversion = os::instance()->convertBetweenColorSpace(srcCS, dstCS); + } } ConvertCS::ConvertCS(ConvertCS&& that)