Boost logo

Boost :

From: Timothy M. Shead (tshead_at_[hidden])
Date: 2006-10-16 23:14:10


I am trying to use GIL with the OpenEXR library, which uses
half-precision floating-point channels:

typedef image_type<half, rgb_t>::type rgb16f_image_t;
typedef pixel<half, rgb_t> rgb16f_pixel_t;

... which works fine. However, I also need to convert to 8bpp integer
images for use with a UI toolkit:

rgb16f_image_t a(100, 100);
rgb8_image_t b(100, 100);
copy_pixels(const_view(a), view(b));

After providing a specialization for PixelsCompatibleConcept the code
compiles fine, but I would like to provide my own code for converting
channels of type "half" to type "bits8" (e.g: to convert values in the
range [0, 1] to [0, 255]).

Any thoughts?

Tim Shead


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk