Boost logo

Boost :

From: Lubomir Bourdev (lbourdev_at_[hidden])
Date: 2006-10-17 12:27:44

> The fact that GIL doesn't provide campling makes me argue it
> is not a mature library. It's such a basic need (I get this
> from reading the book!)

To clamp a channel in GIL you can just say:

T channel;
T clamped = std::min(channel, channel_max_value<T>());

We actually had a set of primitive channel-level algorithms that also
included clamp, but we decided to remove things you can do with a simple
one-line expression so we don't clutter the interface.


Boost list run by bdawes at, gregod at, cpdaniel at, john at