Boost logo

Boost Users :

Subject: [Boost-users] [GIL] How can I copy a subimage_view to a view?
From: blp330 (blp330_at_[hidden])
Date: 2009-04-25 13:39:20


Hi,

I wrapped boost::gil::rgb8_image_t::view_t as a simple class Image:

class Image {
public:
 // ... some methods here.
private:
 boost::gil::rgb8_image_t::view_t view;
};

And I have a method Crop, which is crop image to other image object, like
this:

void Image::Crop(int x, int y, int width, int height, Image& out) const
{
  boost::gil::rgb8_image_t s(width, height);
  boost::gil::copy_pixels(
   boost::gil::subimage_view(view, x, y, width, height),
   boost::gil::view(s));
  out.view = boost::gil::view(s);
}

I will get error after I run this code...

But I can't understand what's wrong.

So, how can I implement this?

Thank you very much.

-- 
View this message in context: http://www.nabble.com/-GIL--How-can-I-copy-a-subimage_view-to-a-view--tp23234549p23234549.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