I\'m trying to move towards Boost GIL to replace some similar functionality I\'ve implemented that is reaching the end of its maintainable life.
I have
Here's some code I once used:
unsigned char * buf = new unsigned char[w * h];
boost::gil::gray8_view_t image =
boost::gil::interleaved_view(w, h, (boost::gil::gray8_pixel_t*)buf, w);
for (size_t i = 0; i < ...; ++i)
{
boost::gil::gray8_view_t::x_iterator it = image.row_begin(i);
// use it[j] to access pixel[i][j]
}
It's only for grayscale, but presumably the coloured version is similar.