- if (!version) {
- /* Loading version 0 (before Rec. 709 was added as a preset).
- Add it in.
- */
- _colour_conversions.push_back (PresetColourConversion (_("Rec. 709"), 2.2, false, dcp::colour_matrix::rec709_to_xyz, 2.6));
+ try {
+ for (list<cxml::NodePtr>::iterator i = cc.begin(); i != cc.end(); ++i) {
+ /* This is a bit of a hack; use 32 (the first Film state file version for the 2.x branch)
+ for version 2 and 10 (the current Film state version for the 1.x branch) for version 1.
+ */
+ _colour_conversions.push_back (PresetColourConversion (*i, version == 2 ? 32 : 10));
+ }
+ } catch (cxml::Error) {
+ /* Probably failed to load an old-style ColourConversion tag; just give up */
+ _colour_conversions.push_back (PresetColourConversion (_("sRGB"), dcp::ColourConversion::srgb_to_xyz ()));
+ _colour_conversions.push_back (PresetColourConversion (_("Rec. 709"), dcp::ColourConversion::rec709_to_xyz ()));