-DEPRECATED PixelFormat get_base_pixelformat(PixelFormat);
-PixelComponents get_components(PixelFormat);
-DEPRECATED PixelFormat get_default_sized_pixelformat(PixelComponents);
-DEPRECATED PixelFormat get_srgb_pixelformat(PixelFormat);
-
-unsigned get_component_count(PixelComponents);
-inline unsigned get_component_count(PixelFormat f)
-{ return get_component_count(get_components(f)); }
-
-DataType get_component_type(PixelFormat);
-inline unsigned get_component_size(PixelFormat f)
-{ return get_type_size(get_component_type(f)); }
-
-bool is_srgb(PixelFormat);
-
-unsigned get_pixel_size(PixelFormat);
+inline PixelComponents get_components(PixelFormat f) { return static_cast<PixelComponents>(f&0xFF); }
+inline unsigned get_component_count(PixelComponents c) { return c&7; }
+inline unsigned get_component_count(PixelFormat f) { return get_component_count(get_components(f)); }
+inline DataType get_component_type(PixelFormat f) { return static_cast<DataType>((f&0xF00)>>8 | (f&0x3000)>>4); }
+inline unsigned get_component_size(PixelFormat f) { return get_type_size(get_component_type(f)); }
+inline bool is_srgb(PixelFormat f) { return f&0x8000; }
+inline unsigned get_pixel_size(PixelFormat f) { return get_component_count(f)*get_type_size(get_component_type(f)); }