diff --git a/include/mapnik/image_filter.hpp b/include/mapnik/image_filter.hpp index cd67325bd..4045cabe8 100644 --- a/include/mapnik/image_filter.hpp +++ b/include/mapnik/image_filter.hpp @@ -402,6 +402,23 @@ void apply_filter(Src & src, gray) boost::gil::copy_and_convert_pixels(color_converted_view(src_view), src_view); } +template +void x_gradient_impl(Src const& src_view, Dst const& dst_view) +{ + for (int y=0; y void apply_filter(Src & src, x_gradient) @@ -414,20 +431,8 @@ void apply_filter(Src & src, x_gradient) rgba8_image_t temp_buffer(src_view.dimensions()); rgba8_view_t dst_view = view(temp_buffer); - for (int y=0; y void apply_filter(Src & src, y_gradient) { using namespace boost::gil; - - rgba8_view_t in = interleaved_view(src.width(),src.height(), - (rgba8_pixel_t*) src.raw_data(), - src.width()*4); - rgba8_image_t temp_buffer(in.dimensions()); - dynamic_xy_step_type::type src_view = rotated90ccw_view(in); - dynamic_xy_step_type::type dst_view = rotated90ccw_view(view(temp_buffer)); - - for (int y=0; y::type::x_iterator src_it = src_view.row_begin(y); - dynamic_xy_step_type::type::x_iterator dst_it = dst_view.row_begin(y); - - for (int x=1; x diff --git a/include/mapnik/image_filter_types.hpp b/include/mapnik/image_filter_types.hpp index 5502f66c1..f39d8a722 100644 --- a/include/mapnik/image_filter_types.hpp +++ b/include/mapnik/image_filter_types.hpp @@ -43,7 +43,7 @@ struct agg_stack_blur : rx(rx_),ry(ry_) {} // an attempt to support older boost spirit (< 1.46) agg_stack_blur() - : rx(0),ry(0) {} + : rx(1),ry(1) {} unsigned rx; unsigned ry; };