
On 29 January 2013 15:59, TONGARI
2013/1/29 Christian Henning
By tag is useful when dealing with swapped channels, like rgb and bgr. For instance when reading a bmp file I read it as bgr but the end user most likely wants the rgb format.
Uh... maybe I didn't express clearly. It's currently defined as:
template
get_color(ColorBase& cb, Color=Color()) I just want to know why not just take Color by the type, e.g.
template
get_color(ColorBase& cb)
One of reasons, because then you couldn't utilise the fantastic feature of template argument deduction. Learn about "don't try help the compiler" principle from STL, at 10:00 min: http://channel9.msdn.com/Series/C9-Lectures-Stephan-T-Lavavej-Core-C-/Stepha... Best regards, -- Mateusz Loskot, http://mateusz.loskot.net