15 #ifndef CONVERT_SRGB_H 16 #define CONVERT_SRGB_H 18 #include "pandabase.h" 20 #include "pnmimage_base.h" 25 extern EXPCL_PANDA_PNMIMAGE
const unsigned char to_srgb8_table[256];
26 extern EXPCL_PANDA_PNMIMAGE
const unsigned char to_linear_uchar_table[256];
27 extern EXPCL_PANDA_PNMIMAGE
const float to_linear_float_table[256];
29 EXPCL_PANDA_PNMIMAGE INLINE
float decode_sRGB_float(
unsigned char val);
30 EXPCL_PANDA_PNMIMAGE INLINE
float decode_sRGB_float(
float val);
31 EXPCL_PANDA_PNMIMAGE INLINE
unsigned char decode_sRGB_uchar(
unsigned char val);
32 EXPCL_PANDA_PNMIMAGE INLINE
unsigned char decode_sRGB_uchar(
float val);
34 EXPCL_PANDA_PNMIMAGE INLINE
float encode_sRGB_float(
unsigned char val);
35 EXPCL_PANDA_PNMIMAGE INLINE
float encode_sRGB_float(
float val);
36 EXPCL_PANDA_PNMIMAGE INLINE
unsigned char encode_sRGB_uchar(
unsigned char val);
37 EXPCL_PANDA_PNMIMAGE INLINE
unsigned char encode_sRGB_uchar(
float val);
41 EXPCL_PANDA_PNMIMAGE INLINE
void encode_sRGB_uchar(
const LColorf &from,
43 EXPCL_PANDA_PNMIMAGE INLINE
void encode_sRGB_uchar(
const LColorf &from,
44 xel &into, xelval &into_alpha);
48 EXPCL_PANDA_PNMIMAGE
unsigned char encode_sRGB_uchar_sse2(
float val);
49 EXPCL_PANDA_PNMIMAGE
void encode_sRGB_uchar_sse2(
const LColorf &from,
51 EXPCL_PANDA_PNMIMAGE
void encode_sRGB_uchar_sse2(
const LColorf &from,
52 xel &into, xelval &into_alpha);
55 EXPCL_PANDA_PNMIMAGE
bool has_sse2_sRGB_encode();
57 #include "convert_srgb.I" This is the base class for all three-component vectors and points.