示例#1
0
 void operator()(io_base& io) const
 {
     if (io.get_color_type() != traits::get_color_type()
         || io.get_bit_depth() != traits::get_bit_depth())
     {
         throw error(detail::wrong_color_space< pixel >::error_msg());
     }
 }
 inline void
 require_color_space< rgba_pixel >::operator()(io_base& io) const
 {
     if (io.get_color_type() != color_type_rgba
         || io.get_bit_depth()
            != pixel_traits< rgba_pixel >::get_bit_depth())
     {
         throw error("RGBA color space required");
     }
 }