]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/gil/test/extension/toolbox/rgb_to_luminance.cpp
2 // Copyright 2013 Christian Henning
3 // Copyright 2013 Davide Anastasia <davideanastasia@users.sourceforge.net>
5 // Distributed under the Boost Software License, Version 1.0
6 // See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt
9 #include <boost/gil.hpp>
10 #include <boost/gil/extension/toolbox/color_converters/rgb_to_luminance.hpp>
12 #include <boost/test/unit_test.hpp>
14 using namespace boost
;
17 struct double_zero
{ static double apply() { return 0.0; } };
18 struct double_one
{ static double apply() { return 1.0; } };
20 using gray64f_pixel_t
= pixel
<double, gray_layout_t
>;
21 using rgb64f_pixel_t
= pixel
<double, rgb_layout_t
>;
23 BOOST_AUTO_TEST_SUITE( toolbox_tests
)
25 BOOST_AUTO_TEST_CASE( rgb_to_luminance_test
)
27 rgb64f_pixel_t
a( 10, 20, 30 );
30 color_convert( a
, b
);
33 BOOST_AUTO_TEST_SUITE_END()