Boost logo

Boost Users :

Subject: Re: [Boost-users] [GIL] wrapper for QImage
From: Christian Henning (chhenning_at_[hidden])
Date: 2009-02-21 17:10:08


> I quickly glanced your code. Unfortunately it seems to take the opposite
> approach of what I had in mind:
> You copy the GIL pixel data into an IPL image, then you do some cool stuff to
> these pixels I suppose, and at the end you might copy everything back to a GIL
> image to finish up...
> What I want to do is provide GIL with a way of directly accessing the pixel
> data owned by a QImage, so all GIL algorithms can work on this data, no
> copying back and forth.
> I haven't dug my way to the bottom of the GIL code yet, but it seems to me GIL
> is designed not to care about the representation of a pixel/an image, so it
> should be quite straightforward to provide some sort of qimage_iterator and
> create a view on a qimage.

I don't think I'm copying back and forth. But nonetheless, depending
on the image type there are some pixel iterators. Please see here:

http://www.boost.org/doc/libs/1_36_0/libs/gil/doc/html/g_i_l_0188.html

Can you get access to the image buffer, scanline length, etc? If so,
you can create an iterator based on the image type.

Christian


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