File indexing completed on 2025-12-16 09:51:51
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_GIL_EXTENSION_TOOLBOX_METAFUNCTIONS_PIXEL_BIT_SIZE_HPP
0009 #define BOOST_GIL_EXTENSION_TOOLBOX_METAFUNCTIONS_PIXEL_BIT_SIZE_HPP
0010
0011 #include <boost/gil/bit_aligned_pixel_reference.hpp>
0012 #include <boost/gil/packed_pixel.hpp>
0013
0014 namespace boost{ namespace gil {
0015
0016
0017
0018
0019
0020
0021
0022
0023 template< typename PixelRef>
0024 struct pixel_bit_size : std::integral_constant<int, 0> {};
0025
0026 template <typename B, typename C, typename L, bool M>
0027 struct pixel_bit_size<bit_aligned_pixel_reference<B, C, L, M>>
0028 : mp11::mp_fold
0029 <
0030 C,
0031 std::integral_constant<int, 0>,
0032 mp11::mp_plus
0033 >
0034 {};
0035
0036 template <typename B, typename C, typename L, bool M>
0037 struct pixel_bit_size<bit_aligned_pixel_reference<B, C, L, M> const>
0038 : mp11::mp_fold
0039 <
0040 C,
0041 std::integral_constant<int, 0>,
0042 mp11::mp_plus
0043 >
0044 {};
0045
0046 template <typename B, typename C, typename L>
0047 struct pixel_bit_size<packed_pixel<B, C, L>>
0048 : mp11::mp_fold
0049 <
0050 C,
0051 std::integral_constant<int, 0>,
0052 mp11::mp_plus
0053 >
0054
0055 {};
0056
0057 template <typename B, typename C, typename L>
0058 struct pixel_bit_size<const packed_pixel<B,C,L> >
0059 : mp11::mp_fold
0060 <
0061 C,
0062 std::integral_constant<int, 0>,
0063 mp11::mp_plus
0064 >
0065 {};
0066
0067 }}
0068
0069 #endif