Boost logo

Boost Users :

Subject: [Boost-users] [GIL] How can I in-place convert some part of view to grayscale.
From: blp330 (blp330_at_[hidden])
Date: 2009-04-10 09:57:00


Hi,

I have a rgb8_image_t::view_t view, and I want to convert some part of it to
grayscale within its region,
for example: 0,0,100,100 (x,y,width,height)

How can I do this?

I try to do this but it can't be compiled.

 typedef boost::gil::pixel<
   typename boost::gil::channel_type<
    boost::gil::rgb8_image_t::view_t>::type,
   boost::gil::gray_layout_t> gray_pixel_t;

  boost::gil::copy_pixels(
   boost::gil::color_converted_view<gray_pixel_t>(
    boost::gil::subimage_view(view, x, y, width, height)),
   boost::gil::subimage_view(view, x, y, width, height));

Thank you very much.

-- 
View this message in context: http://www.nabble.com/-GIL--How-can-I-in-place-convert-some-part-of-view-to-grayscale.-tp22988366p22988366.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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