
17 Oct
2006
17 Oct
'06
4:27 p.m.
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. Lubomir