Boost logo

Boost :

From: Lubomir Bourdev (lbourdev_at_[hidden])
Date: 2006-12-10 14:46:39

Andreas Pokorny wrote:
> Hi there
> I just tried to convert an arbitrary jpeg image to a
> grayscale image and write it to a png file. The attached file
> fails to compile, because there is no pixel_t in an
> any_image_view.


GIL went through some major changes to color conversion. Apparently I
had forgotten to apply one interface change to dynamic images. I will
fix this in the next release of GIL.

This is how you can do it today:

typedef boost::mpl::vector<gray8_image_t, gray16_image_t, rgb8_image_t,
rgb16_image_t> my_img_types;
any_image<my_img_types> runtime_img;
jpeg_read_image("test.jpg", runtime_img);

typedef any_image<my_img_types>::view_t::const_t::types_t my_civ_types;
png_write_view("test_out.jpg", any_color_converted_view<my_civ_types,


Boost list run by bdawes at, gregod at, cpdaniel at, john at