[ASL] Should fill_pixels work with the view produced by subsampled_view?
- Dominant language
- C++
- Stars
- 199
- Forks
- 171
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 10
Description
Report copied from Adobe Source Libraries (ASL) discussion forum https://sourceforge.net/p/adobe-source/discussion/648138/thread/c94ac980/
------
Should `fill_pixels` work with the view produced by `subsampled_view`?
It seems `memory_based_step_iterator` does not model a `PixelIterator`.
For example, this does not compile:
```
#include
#include
using namespace boost;
using namespace gil;
int main(int argc, char **argv) {
rgb8_pixel_t black(0,0,0);
rgb8_planar_image_t img(8,8,black, 0);
dynamic_xy_step_type::type v(subsampled_view(view(img), 1, 2));
rgb8_pixel_t white(255,255,255);
fill_pixels(v, white);
return 0;
}
```
```
c++ -Wall -I/usr/local/include -c fillpix.cpp
/usr/local/include/boost/gil/color_base_algorithm.hpp: In instantiation of 'boost::gil::size > > >':
/usr/local/include/boost/gil/color_base_algorithm.hpp:673: instantiated from 'Op boost::gil::static_for_each(P1&, P2&, const P3&, Op) [with P1 = boost::gil::memory_based_step_iterator > >, P2 = boost::gil::memory_based_step_iterator > >, P3 = boost::gil::pixel, boost::mpl::range_c > >, Op = boost::gil::detail::std_fill_t]'
/usr/local/include/boost/gil/algorithm.hpp:404: instantiated from 'void boost::gil::detail::fill_aux(It, It, const P&, mpl_::true_) [with It = boost::gil::memory_based_step_iterator > >, P = boost::gil::pixel, boost::mpl::range_c > >]'
/usr/local/include/boost/gil/algorithm.hpp:419: instantiated from 'void boost::gil::fill_pixels(const View&, const Value&) [with View = boost::gil::image_view > > > > >, Value = boost::gil::rgb8_pixel_t]'
fillpix.cpp:13: instantiated from here
/usr/local/include/boost/gil/color_base_algorithm.hpp:58: error: no type named 'layout_t' in 'class boost::gil::memory_based_step_iterator > >'
/usr/local/include/boost/gil/color_base_algorithm.hpp: In function 'Op boost::gil::static_for_each(P1&, P2&, const P3&, Op) [with P1 = boost::gil::memory_based_step_iterator > >, P2 = boost::gil::memory_based_step_iterator > >, P3 = boost::gil::pixel, boost::mpl::range_c > >, Op = boost::gil::detail::std_fill_t]':
/usr/local/include/boost/gil/algorithm.hpp:404: instantiated from 'void boost::gil::detail::fill_aux(It, It, const P&, mpl_::true_) [with It = boost::gil::memory_based_step_iterator > >, P = boost::gil::pixel, boost::mpl::range_c > >]'
/usr/local/include/boost/gil/algorithm.hpp:419: instantiated from 'void boost::gil::fill_pixels(const View&, const Value&) [with View = boost::gil::image_view > > > > >, Value = boost::gil::rgb8_pixel_t]'
fillpix.cpp:13: instantiated from here
/usr/local/include/boost/gil/color_base_algorithm.hpp:673: error: 'value' is not a member of 'boost::gil::size
Contributor guide
Assessment
This issue has not been assessed yet.