oln::convert::f_rgb_to_hsl< inbits, outbits > Struct Template Reference

#include <rgbhsl.hh>

Inheritance diagram for oln::convert::f_rgb_to_hsl< inbits, outbits >:

Inheritance graph
[legend]
Collaboration diagram for oln::convert::f_rgb_to_hsl< inbits, outbits >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

color< 3, outbits, hsl_traits > doit (const color< 3, inbits, rgb_traits > &v) const

Static Public Member Functions

std::string name ()

Detailed Description

template<unsigned inbits, unsigned outbits>
struct oln::convert::f_rgb_to_hsl< inbits, outbits >

Functor for conversion from RGB to HSL color space.

Note:
Every conversion should go though the RGB color space.
#include <oln/basics2d.hh> #include <oln/convert/rgbhsl.hh> #include <ntg/all.hh> int main() { oln::image2d<ntg::rgb_8> lena_rgb = oln::load(IMG_IN "lena.ppm"); oln::image2d<ntg::hsl_8> lena_hsl = apply(oln::convert::f_rgb_to_hsl<8, 8>(), lena_rgb); oln::image2d<ntg::hsl_8>::iter_type it(lena_hsl); for_all(it) lena_hsl[it][ntg::hsl_L] = 127; oln::io::save(apply(oln::convert::f_hsl_to_rgb<8, 8>(), lena_hsl), IMG_OUT "oln_convert_f_rgb_to_hsl.pgm"); }
lena_ppm.png
=>
oln_convert_f_rgb_to_hsl.png

Definition at line 83 of file rgbhsl.hh.


The documentation for this struct was generated from the following file:
Generated on Thu Apr 15 20:15:26 2004 for Olena by doxygen 1.3.6-20040222