Hi Tomas, I once have created an ipl_image_wrapper for OpenCV. Have a look at
http://gil-contributions.googlecode.com/svn/trunk/gil_2/boost/gil/extension/...
This wrapper made it possible to use the OpenCV algorithms. It's uses
shared_ptr to provide value semantics. I would think you can do
something similar with QImage. Unfortunately, I know nothing about
QImage. But I can offer more help with more informations.
Hope this helps. Are you planning on creating a gil extension?
Regards,
Christian
On Sat, Feb 21, 2009 at 2:54 PM, Tomas Van Verrewegen
Hi,
I'm planning to write an image manipulation application using Boost.GIL as a backbone and Qt for the interface. Now I was thinking it might be a good idea to write a wrapper around QImage to give GIL direct access to the pixels of a QImage.
I've been looking at the code and as far as I can tell I have 2 options: (1) create a new GIL image type that wraps the QImage (2) create a "qimage_pixel_iterator" and use "... interleaved_view(...)"
Now my question(s): - Would (2) be enough, or is it necessary to also create (1)? - "QRgb" (Qt's pixel type) is a typedef for "unsigned int", so specialising eg. "template<class Pixel> struct gil::channel_type" for "unsigned int" seems somewhat suboptimal (is it an 8bit RGBA pixel or a 32bit Gray pixel?). Some sort of proxy class might be appropriate? Maybe a gil::pixel<...> subclass? _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users