Boost logo

Boost Users :

Subject: Re: [Boost-users] [gil] Using gil::color_converted_view with gil::for_each_pixel
From: Chris Yuen (kizzx2+boost_at_[hidden])
Date: 2010-12-05 08:20:54


Hello Christian,

Thanks for your guidance! I took a look at semantic_at_c() and get_color()
and they seem to do the trick!

Here's a couple of more questions. I've posted a compiling, annotated code
at

http://boost.codepad.org/Fy2vP73l

Below is the more elaborate description of my questions which can be found
in the code:

1. Can I specify which channel to get in nth_channel_view()? For example, if
I want to set the red channel to 255 for all the pixels, I would do
gil::fil_pixels(gil::nth_channel_view(view, 0), 255). However, that only
works if our view is rgb8 or bgr8, not argb8. Is there a way I can say
something like gil::fill_pixels(gil::nth_channel_view(view,
gil::find_channel_for_view(view, gil::red_t())), 255) ???

2. This compiles

gil::gil_function_requires<gil::ImageViewConcept<int> >();

Strange. Any ideas?

Best regards,
Chris Yuen

P.S. I am definitely interested in reviewing the extension! Apparently I'm a
begginer in GIL. How would you like me to review and where should I write
to?



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