Boost GIL


Functions

Returns the inverse of a channel. result = max_value - x + min_value. More...

Functions

template<typename Channel >
auto channel_invert (Channel x) -> typename channel_traits< Channel >::value_type
 Default implementation. Provide overloads for performance.
 

Detailed Description

Returns the inverse of a channel. result = max_value - x + min_value.

Example:

// uint8_t == uint8_t == unsigned char
uint8_t x=255;
uint8_t inv = channel_invert(x);
assert(inv == 0);
auto channel_invert(Channel x) -> typename channel_traits< Channel >::value_type
Default implementation. Provide overloads for performance.
Definition: channel_algorithm.hpp:582