File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,10 @@ std::string getImageColorSpace(const OIIO::ImageSpec& oiioSpec, const std::strin
88
88
std::string colorSpaceFromFileName = " " ;
89
89
if (!imagePath.empty ())
90
90
{
91
- colorSpaceFromFileName = getGlobalColorConfigOCIO ().getColorSpaceFromFilepath (imagePath);
91
+ // Use only filename for color space infering
92
+ const std::string filename = fs::path (imagePath).filename ().string ();
93
+ colorSpaceFromFileName = getGlobalColorConfigOCIO ().getColorSpaceFromFilepath (filename);
94
+ boost::algorithm::to_lower (colorSpaceFromFileName);
92
95
}
93
96
94
97
std::map<std::string, std::string> mapColorSpaces;
@@ -121,7 +124,7 @@ std::string getImageColorSpace(const OIIO::ImageSpec& oiioSpec, const std::strin
121
124
{
122
125
colorSpace = mapColorSpaces.at (" workPlateColourSpace" );
123
126
}
124
- else if (!colorSpaceFromFileName.empty ())
127
+ else if (!colorSpaceFromFileName.empty () && colorSpaceFromFileName != " raw " )
125
128
{
126
129
colorSpace = colorSpaceFromFileName;
127
130
}
You can’t perform that action at this time.
0 commit comments