2 // Copyright 2019 Mateusz Loskot <mateusz at loskot dot net>
4 // Distributed under the Boost Software License, Version 1.0
5 // See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt
8 #include <boost/gil.hpp>
10 namespace gil = boost::gil;
12 template <typename View>
15 static_assert(gil::is_planar<View>::value, "view should be planar");
18 template <typename View>
19 void test_is_planar_not()
21 static_assert(!gil::is_planar<View>::value, "view should not be planar");
27 test_is_planar_not<gil::gray8_view_t>();
28 test_is_planar_not<gil::gray8c_view_t>();
30 test_is_planar_not<gil::abgr8_view_t>();
31 test_is_planar_not<gil::abgr8_step_view_t>();
32 test_is_planar_not<gil::abgr8c_view_t>();
33 test_is_planar_not<gil::abgr8c_step_view_t>();
35 test_is_planar_not<gil::argb8_view_t>();
36 test_is_planar_not<gil::argb8_step_view_t>();
37 test_is_planar_not<gil::argb8c_view_t>();
38 test_is_planar_not<gil::argb8c_step_view_t>();
40 test_is_planar_not<gil::bgr8_view_t>();
41 test_is_planar_not<gil::bgr8_step_view_t>();
42 test_is_planar_not<gil::bgr8c_view_t>();
43 test_is_planar_not<gil::bgr8c_step_view_t>();
45 test_is_planar_not<gil::bgra8_view_t>();
46 test_is_planar_not<gil::bgra8_step_view_t>();
47 test_is_planar_not<gil::bgra8c_view_t>();
48 test_is_planar_not<gil::bgra8c_step_view_t>();
50 test_is_planar_not<gil::rgb8_view_t>();
51 test_is_planar_not<gil::rgb8_step_view_t>();
52 test_is_planar_not<gil::rgb8c_view_t>();
53 test_is_planar_not<gil::rgb8c_step_view_t>();
54 test_is_planar<gil::rgb8_planar_view_t>();
55 test_is_planar<gil::rgb8_planar_step_view_t>();
56 test_is_planar<gil::rgb8c_planar_view_t>();
57 test_is_planar<gil::rgb8c_planar_step_view_t>();
59 test_is_planar_not<gil::rgba8_view_t>();
60 test_is_planar_not<gil::rgba8_step_view_t>();
61 test_is_planar_not<gil::rgba8c_view_t>();
62 test_is_planar_not<gil::rgba8c_step_view_t>();
63 test_is_planar<gil::rgba8_planar_view_t>();
64 test_is_planar<gil::rgba8_planar_step_view_t>();
65 test_is_planar<gil::rgba8c_planar_view_t>();
66 test_is_planar<gil::rgba8c_planar_step_view_t>();
68 test_is_planar_not<gil::cmyk8_view_t>();
69 test_is_planar_not<gil::cmyk8_step_view_t>();
70 test_is_planar_not<gil::cmyk8c_view_t>();
71 test_is_planar_not<gil::cmyk8c_step_view_t>();
73 test_is_planar<gil::cmyk8_planar_view_t>();
74 test_is_planar<gil::cmyk8_planar_step_view_t>();
75 test_is_planar<gil::cmyk8c_planar_view_t>();
76 test_is_planar<gil::cmyk8c_planar_step_view_t>();