Boost GIL


io/typedefs.hpp
1 //
2 // Copyright 2007-2008 Christian Henning
3 //
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
7 //
8 #ifndef BOOST_GIL_IO_TYPEDEFS_HPP
9 #define BOOST_GIL_IO_TYPEDEFS_HPP
10 
11 #ifdef BOOST_GIL_IO_ENABLE_GRAY_ALPHA
12 #include <boost/gil/extension/toolbox/color_spaces/gray_alpha.hpp>
13 #endif // BOOST_GIL_IO_ENABLE_GRAY_ALPHA
14 
15 #include <boost/gil/image.hpp>
16 #include <boost/gil/point.hpp>
17 #include <boost/gil/utilities.hpp>
18 
19 #include <type_traits>
20 #include <vector>
21 
22 namespace boost { namespace gil {
23 
24 struct double_zero { static double apply() { return 0.0; } };
25 struct double_one { static double apply() { return 1.0; } };
26 
27 using byte_t = unsigned char;
28 using byte_vector_t = std::vector<byte_t>;
29 
30 }} // namespace boost::gil
31 
32 namespace boost {
33 
34 template<> struct is_floating_point<gil::float32_t> : std::true_type {};
35 template<> struct is_floating_point<gil::float64_t> : std::true_type {};
36 
37 } // namespace boost
38 
39 namespace boost { namespace gil {
40 
43 
44 using gray1_image_t = bit_aligned_image1_type<1, gray_layout_t>::type;
45 using gray2_image_t = bit_aligned_image1_type<2, gray_layout_t>::type;
46 using gray4_image_t = bit_aligned_image1_type<4, gray_layout_t>::type;
47 using gray6_image_t = bit_aligned_image1_type<6, gray_layout_t>::type;
48 using gray10_image_t = bit_aligned_image1_type<10, gray_layout_t>::type;
49 using gray12_image_t = bit_aligned_image1_type<12, gray_layout_t>::type;
50 using gray14_image_t = bit_aligned_image1_type<14, gray_layout_t>::type;
51 using gray24_image_t = bit_aligned_image1_type<24, gray_layout_t>::type;
52 
53 using gray64f_pixel_t = pixel<double, gray_layout_t>;
54 
55 #ifdef BOOST_GIL_IO_ENABLE_GRAY_ALPHA
56 using gray_alpha8_pixel_t = pixel<uint8_t, gray_alpha_layout_t>;
57 using gray_alpha16_pixel_t = pixel<uint16_t, gray_alpha_layout_t>;
58 using gray_alpha64f_pixel_t = pixel<double, gray_alpha_layout_t>;
59 #endif // BOOST_GIL_IO_ENABLE_GRAY_ALPHA
60 
61 using rgb64f_pixel_t = pixel<double, rgb_layout_t>;
62 using rgba64f_pixel_t = pixel<double, rgba_layout_t>;
63 using gray64f_image_t = image<gray64f_pixel_t, false>;
64 
65 #ifdef BOOST_GIL_IO_ENABLE_GRAY_ALPHA
66 using gray_alpha8_image_t = image<gray_alpha8_pixel_t, false>;
67 using gray_alpha16_image_t = image<gray_alpha16_pixel_t, false>;
68 using gray_alpha32f_image_t = image<gray_alpha32f_pixel_t, false>;
69 using gray_alpha32f_planar_image_t = image<gray_alpha32f_pixel_t, true>;
70 using gray_alpha64f_image_t = image<gray_alpha64f_pixel_t, false>;
71 using gray_alpha64f_planar_image_t = image<gray_alpha64f_pixel_t, true>;
72 
73 #endif // BOOST_GIL_IO_ENABLE_GRAY_ALPHA
74 
75 using rgb64f_image_t = image<rgb64f_pixel_t, false>;
76 using rgb64f_planar_image_t = image<rgb64f_pixel_t, true>;
77 using rgba64f_image_t = image<rgba64f_pixel_t, false>;
78 using rgba64f_planar_image_t = image<rgba64f_pixel_t, true>;
79 
80 }} // namespace boost::gil
81 
82 #endif
scoped_channel_value< double, float_point_zero< double >, float_point_one< double > > float64_t
64-bit floating point channel type with range [0.0f ... 1.0f]. Models ChannelValueConcept
Definition: typedefs.hpp:157
scoped_channel_value< float, float_point_zero< float >, float_point_one< float > > float32_t
32-bit floating point channel type with range [0.0f ... 1.0f]. Models ChannelValueConcept
Definition: typedefs.hpp:153
defined(BOOST_NO_CXX17_HDR_MEMORY_RESOURCE)
Definition: algorithm.hpp:36