Boost logo

Boost Users :

Subject: Re: [Boost-users] gil and OpenGL
From: Nicolas Lelong (rotoglup_at_[hidden])
Date: 2010-01-10 16:05:59


You could also simply create a view on your memory buffer (using
boost::gil::interleaved_view) and then copy the pixels of your source view
to this new view.

This would give something like (untested, uncompiled, pseudocode) :

data = (unsigned char*)malloc(src_view.width()*src_view.height()*4);
dst_view = boost::gil::interleaved_view(src_view.width(), src_view.height(),
data, src_view.width()*4);
std::copy(src_view.begin(), src_view.end(), dst_view.begin());

and you're done...



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net