Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
[exr] Don't try to assign an RGBA profile when loading Gray-only EXR
Dmitry Kazakova5c79f5b7268
diff --git a/plugins/impex/exr/exr_converter.cc b/plugins/impex/exr/exr_converter.ccindex 9ce49b40d5..677bca04fc 100644--- a/plugins/impex/exr/exr_converter.cc+++ b/plugins/impex/exr/exr_converter.cc@@ -203,7 +203,16 @@ const KoColorSpace *kisTypeToColorSpace(QString colorModelID, ImageType imageTyp};const QString colorSpaceId = KoColorSpaceRegistry::instance()->colorSpaceId(colorModelID, colorDepthID);- const QString profileName = KisConfig(false).readEntry("ExrDefaultColorProfile", KoColorSpaceRegistry::instance()->defaultProfileForColorSpace(colorSpaceId));+ const QString defaultProfileForColorSpace = KoColorSpaceRegistry::instance()->defaultProfileForColorSpace(colorSpaceId);++ /**+ * Our user settings are only for the RGB color model, for other models just use+ * the default one provided by the color space.+ */+ const QString profileName =+ colorModelID == RGBAColorModelID.id() ?+ KisConfig(false).readEntry("ExrDefaultColorProfile", defaultProfileForColorSpace) :+ defaultProfileForColorSpace;return KoColorSpaceRegistry::instance()->colorSpace(colorModelID, colorDepthID, profileName);