void box_blur_rgba( const const_image_view_t& src, const image_view_t& dst, float hradius, float vradius, int iters) { if( hradius == 0 && vradius == 0) { boost::gil::copy_pixels( src, dst); return; } image_t buffer( src.height(), src.width()); box_blur_rgba_( src, boost::gil::view( buffer), dst, hradius, vradius, iters); }
void box_blur_rgba( const const_image_view_t& src, const image_view_t& tmp, const image_view_t& dst, float hradius, float vradius, int iters) { RAMEN_ASSERT( src.width() == tmp.height()); RAMEN_ASSERT( src.height() == tmp.width()); if( hradius == 0 && vradius == 0) { boost::gil::copy_pixels( src, dst); return; } box_blur_rgba_( src, tmp, dst, hradius, vradius, iters); }
void invert_alpha( const const_image_view_t& src, const image_view_t& dst) { RAMEN_ASSERT( src.width() == dst.width()); RAMEN_ASSERT( src.height() == dst.height()); boost::gil::tbb_transform_pixels( src, dst, detail::invert_alpha_fun()); }
sampler_t::sampler_t( const const_image_view_t& src ) : src_(src) { src_area_ = Imath::Box2i( Imath::V2i( 0, 0), Imath::V2i( src.width() - 1, src.height() - 1)); }
void smart_blur_rgba( const const_image_view_t& src, const image_view_t& dst, float stddevx, float stddevy, float thereshold) { image::image_t tmp( src.height(), src.width()); smart_blur_rgba( src, boost::gil::view( tmp), dst, stddevx, stddevy, thereshold); }