Logo Search packages:      
Sourcecode: libgphoto2 version File versions  Download package

int gp_gamma_fill_table ( unsigned char *  table,
double  g 

Initialize a Gamma conversion table.

Initializes the gamma conversion table for later use by gp_gamma_correct_single(). Requires a 256 byte array as table.

table a 256 byte array of unsigned char
g gamma correction value
a gphoto error code

Definition at line 78 of file gamma.c.

References GP_OK.

      unsigned int x;

      for (x = 0; x < 256; x++)
            table[x] = 255 * pow ((double) x/255., g);

      return (GP_OK);

Generated by  Doxygen 1.6.0   Back to index