diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-08-17 21:47:08 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-08-17 21:47:08 +0100 |
| commit | 2499c41097f8410cb3016e095a85d68979485a7b (patch) | |
| tree | 331a23489d3be42ede2861311a797792ba663805 /src/lib/colour_conversion.h | |
| parent | 89af81886eeee57861bc23984a0583bec76d536d (diff) | |
Various bits mostly related to colour conversions.
Diffstat (limited to 'src/lib/colour_conversion.h')
| -rw-r--r-- | src/lib/colour_conversion.h | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/src/lib/colour_conversion.h b/src/lib/colour_conversion.h index ed89f8c63..85d951ce1 100644 --- a/src/lib/colour_conversion.h +++ b/src/lib/colour_conversion.h @@ -17,7 +17,11 @@ */ +#ifndef DCPOMATIC_COLOUR_CONVERSION_H +#define DCPOMATIC_COLOUR_CONVERSION_H + #include <boost/utility.hpp> +#include <boost/optional.hpp> #include <boost/numeric/ublas/matrix.hpp> namespace cxml { @@ -28,18 +32,37 @@ namespace xmlpp { class Node; } -class ColourConversion : public boost::noncopyable +class ColourConversion { public: ColourConversion (); - ColourConversion (std::string, float, bool, float const matrix[3][3], float); + ColourConversion (double, bool, double const matrix[3][3], double); ColourConversion (boost::shared_ptr<cxml::Node>); + virtual void as_xml (xmlpp::Node *) const; + + boost::optional<size_t> preset () const; + + double input_gamma; + bool input_gamma_linearised; + boost::numeric::ublas::matrix<double> matrix; + double output_gamma; +}; + +class PresetColourConversion +{ +public: + PresetColourConversion (); + PresetColourConversion (std::string, double, bool, double const matrix[3][3], double); + PresetColourConversion (boost::shared_ptr<cxml::Node>); + void as_xml (xmlpp::Node *) const; std::string name; - float input_gamma; - bool input_gamma_linearised; - boost::numeric::ublas::matrix<float> matrix; - float output_gamma; + ColourConversion conversion; }; + +bool operator== (ColourConversion const &, ColourConversion const &); +bool operator!= (ColourConversion const &, ColourConversion const &); + +#endif |
