LUMINANCE_ALPHA = 0x42
};
+/**
+Describes a mapping from one set of components to another.
+*/
+enum ComponentSwizzle
+{
+ NO_SWIZZLE,
+ R_TO_LUMINANCE,
+ RG_TO_LUMINANCE_ALPHA,
+ RGB_TO_BGR,
+ RGBA_TO_RGB
+};
+
/**
Identifies a pixel format, with components and type.
PixelComponents components_from_graphics(Graphics::PixelFormat);
PixelFormat pixelformat_from_image(const Graphics::Image &, bool = false);
+ComponentSwizzle get_required_swizzle(PixelComponents);
+PixelComponents swizzle_components(PixelComponents, ComponentSwizzle);
+PixelComponents unswizzle_components(PixelComponents, ComponentSwizzle);
+
PixelFormat make_pixelformat(PixelComponents, DataType, bool = false);
inline PixelComponents get_components(PixelFormat f) { return static_cast<PixelComponents>(f&0xFF); }
inline unsigned get_component_count(PixelComponents c) { return c&7; }