Boost logo

Boost Users :

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


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/opencv/ipl_image_wrapper.hpp

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
<tomasvanverrewegen_at_[hidden]> wrote:
> 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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


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