diff --git a/include/boost/gil/extension/numeric/pixel_numeric_operations.hpp b/include/boost/gil/extension/numeric/pixel_numeric_operations.hpp index fd602f766..f5fc7c3e5 100644 --- a/include/boost/gil/extension/numeric/pixel_numeric_operations.hpp +++ b/include/boost/gil/extension/numeric/pixel_numeric_operations.hpp @@ -85,6 +85,23 @@ struct pixel_multiplies_scalar_t { } }; +/// \ingroup PixelNumericOperations +/// \brief construct for dividing two pixels +template // models pixel value concept +struct pixel_multiply_t { + PixelR operator() (const PixelRef1& p1, + const PixelRef2& p2) const { + PixelR result; + static_transform(p1,p2,result, + channel_multiplies_t::type, + typename channel_type::type, + typename channel_type::type>()); + return result; + } +}; + /// \ingroup PixelNumericOperations /// \brief construct for dividing a pixel by a scalar template // models pixel value concept +struct pixel_divide_t { + PixelR operator() (const PixelRef1& p1, + const PixelRef2& p2) const { + PixelR result; + static_transform(p1,p2,result, + channel_divides_t::type, + typename channel_type::type, + typename channel_type::type>()); + return result; + } +}; + /// \ingroup PixelNumericOperations /// \brief construct for dividing a pixel by 2 template // models pixel concept