Parameters of Color Conversion (spec)
Parameters of Color Conversion (spec)#
Color conversion functions take common specification with alpha-channel values which are required only for channel4
layouts with transparency channel.
For other conversions, specification is not unused.
Description
color_conversion_spec
class contains an alpha-channel values and might contain any additional parameters for conversion.
-
template<typename DataT>
class color_conversion_spec Color conversion parameters.
- Template Parameters
DataT – destination image data type
Public Functions
-
constexpr color_conversion_spec(DataT a_value = max_color_v<DataT>) noexcept
Construct convert specification with provided parameter of same data type for alpha channel.
- Parameters
a_value – value to fill alpha channel of result RGBA image
-
template<typename OtherDataT, std::enable_if_t<std::is_arithmetic_v<OtherDataT>, std::uint32_t> = 0U>
explicit constexpr color_conversion_spec(OtherDataT a_value) Construct convert specification with provided parameter of different data type for alpha channel.
- Parameters
a_value – value to fill alpha channel of result RGBA image
-
constexpr DataT get_alpha_value() const noexcept
Getter for alpha channel value.
- Returns
alpha channel value