Skip to content

Commit

Permalink
[image io]
Browse files Browse the repository at this point in the history
Add log trace when OCIO config file found.
Update OCIO config file by removing the possibility to call the OCIO V1 method to identify the color space from the file name. Default color space is still sRGB.
  • Loading branch information
demoulinv committed May 31, 2022
1 parent cdb989b commit 901803d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/aliceVision/image/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,13 @@ std::string getColorConfigFilePath()
configOCIOFilePath.append("/share/aliceVision/config.ocio");

if (!fs::exists(configOCIOFilePath))
{
ALICEVISION_THROW_ERROR("OCIO configuration file: '" << configOCIOFilePath << "' does not exist.");
}
else
{
ALICEVISION_LOG_TRACE("OCIO configuration file: '" << configOCIOFilePath << "' found.");
}

return configOCIOFilePath;
}
Expand Down
2 changes: 1 addition & 1 deletion src/aliceVision/image/io_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ int setenv(const char* name, const char* value, int overwrite)
int err = setenv("ALICEVISION_ROOT", std::string(THIS_SOURCE_DIR).c_str(), 1);

// tested extensions
static std::vector<std::string> extensions = {"jpg", "png", "pgm", "ppm", "tiff", "exr"};
static std::vector<std::string> extensions = { "jpg", "png", "pgm", "ppm", "tiff", "exr" };

BOOST_AUTO_TEST_CASE(read_unexisting) {
Image<unsigned char> image;
Expand Down
2 changes: 1 addition & 1 deletion src/aliceVision/image/share/aliceVision/config.ocio
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ file_rules:
#
# The next rule uses the OCIO v1 method of searching the path for all colorspaces in the config.
#
- !<Rule> {name: ColorSpaceNamePathSearch}
# - !<Rule> {name: ColorSpaceNamePathSearch}
#
# The rules are ordered, highest priority first. OCIO takes the path to a file and applies
# the rules one-by-one until there is a match. The last rule, "Default", always matches.
Expand Down

0 comments on commit 901803d

Please sign in to comment.