|
12 | 12 | #include "libdpx/DPX.h" |
13 | 13 | #include "libdpx/DPXColorConverter.h" |
14 | 14 |
|
| 15 | +#include <OpenImageIO/color.h> |
15 | 16 | #include <OpenImageIO/fmath.h> |
16 | 17 | #include <OpenImageIO/imageio.h> |
17 | 18 | #include <OpenImageIO/strutil.h> |
@@ -435,14 +436,18 @@ DPXOutput::prep_subimage(int s, bool allocate) |
435 | 436 | m_desc = get_image_descriptor(); |
436 | 437 |
|
437 | 438 | // transfer function |
| 439 | + const ColorConfig& colorconfig = ColorConfig::default_colorconfig(); |
438 | 440 | std::string colorspace = spec_s.get_string_attribute("oiio:ColorSpace", ""); |
439 | | - if (Strutil::iequals(colorspace, "Linear")) |
| 441 | + if (colorconfig.equivalent(colorspace, "lin_rec709_scene")) |
440 | 442 | m_transfer = dpx::kLinear; |
441 | | - else if (Strutil::istarts_with(colorspace, "Gamma")) |
442 | | - m_transfer = dpx::kUserDefined; |
443 | | - else if (Strutil::iequals(colorspace, "Rec709")) |
| 443 | + else if (colorconfig.equivalent(colorspace, "srgb_rec709_scene")) |
444 | 444 | m_transfer = dpx::kITUR709; |
445 | | - else if (Strutil::iequals(colorspace, "KodakLog")) |
| 445 | + else if (colorconfig.equivalent(colorspace, "g22_rec709_scene") |
| 446 | + || colorconfig.equivalent(colorspace, "g24_rec709_scene") |
| 447 | + || colorconfig.equivalent(colorspace, "g18_rec709_scene") |
| 448 | + || Strutil::istarts_with(colorspace, "Gamma")) |
| 449 | + m_transfer = dpx::kUserDefined; |
| 450 | + else if (colorconfig.equivalent(colorspace, "KodakLog")) |
446 | 451 | m_transfer = dpx::kLogarithmic; |
447 | 452 | else { |
448 | 453 | std::string dpxtransfer = spec_s.get_string_attribute("dpx:Transfer", |
|
0 commit comments