I'm having trouble finding an accelerated image library.
I could not find the exact documentation on how to use the interleaved_view function included in the boost :: gil library. More specifically, I do not know exactly in which binary format the raw data should be stored.
The only mention of this I could find was in the gil tutorial:
void XGradientRGB8_BGR16(const unsigned char* src_pixels, ptrdiff_t src_row_bytes, int w, int h,
signed short* dst_pixels, ptrdiff_t dst_row_bytes) {
rgb8c_view_t src = interleaved_view(w,h,(const rgb8_pixel_t*)src_pixels,src_row_bytes);
rgb16s_view_t dst = interleaved_view(w,h,( rgb16s_pixel_t*)dst_pixels,dst_row_bytes);
x_gradient(src,dst);
}
Also, the function prototype says
template<typename Iterator>
type_from_x_iterator< Iterator>::view_t
boost::gil::interleaved_view (std::size_t width, std::size_t height, Iterator pixels, std::ptrdiff_t rowsize_in_bytes)
My question is what exactly is the gil format expecting in binary format, and what exactly is rowize_in_bytes, which should be?
, , - OpenGL, RGB , . , rowsize_in_bytes , PNG :
void makeImage(const string fileName, const unsigned char * src, const int w, const int h) {
rgb8c_view_t outImage = interleaved_view(w,h, (const rgb8_pixel_t*) src, w*3*sizeof(unsigned char));
boost::gil::png_write_view(fileName,outImage);
}
src w * h,
(char)R, (char)G, (char)B, (char)R, (char)G, (char)B, (char)R, (char)G, (char)B ...
. , , , ...

- , , interleaved_view, . !
EDIT: , , . ...:( , , ,