Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
packed_pixel

A heterogeneous pixel used to represent packed pixels with non-byte-aligned channels. More...

Collaboration diagram for packed_pixel:

Classes

struct  boost::gil::packed_pixel< BitField, ChannelRefVec, Layout >
 Heterogeneous pixel value whose channel references can be constructed from the pixel bitfield and their index. More...
 

Detailed Description

A heterogeneous pixel used to represent packed pixels with non-byte-aligned channels.

Models PixelValueConcept

Example:

typedef packed_pixel_type<uint16_t, mpl::vector3_c<unsigned,5,6,5>, rgb_layout_t>::type rgb565_pixel_t;
BOOST_STATIC_ASSERT((sizeof(rgb565_pixel_t)==2));
rgb565_pixel_t r565;
get_color(r565,red_t()) = 31;
get_color(r565,green_t()) = 63;
get_color(r565,blue_t()) = 31;
assert(r565 == rgb565_pixel_t((uint16_t)0xFFFF));