libgphoto2 photo camera library (libgphoto2) API 2.5.30

Functions
gamma.c File Reference
`#include "config.h"`
`#include "libgphoto2/gamma.h"`
`#include <math.h>`
`#include <gphoto2/gphoto2-result.h>`
Include dependency graph for gamma.c:

## Functions
int | gp_gamma_correct_single (unsigned char *table, unsigned char *data, unsigned int size)
| Gamma correction.
int | gp_gamma_fill_table (unsigned char *table, double g)
| Initialize a Gamma conversion table.

## Detailed Description

Author
  Copyright 2001 Lutz Mueller lutz@.nosp@m.user.nosp@m.s.sf..nosp@m.net

License
  This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

## Function Documentation

## ◆ gp_gamma_correct_single()

int gp_gamma_correct_single | ( | unsigned char * | table,
|  | unsigned char * | data,
|  | unsigned int | size
| ) |  |

Gamma correction.

Corrects size pixels within the table with a given Gamma correction table.

Parameters

  table | the gamma correction table as generated by gp_gamma_fill_table()
  data | the data do process, both input and output
  size | in number of pixels (RGB byte pairs)

Returns
  a gphoto error code

## ◆ gp_gamma_fill_table()

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.

Parameters

  table | a 256 byte array of unsigned char
  g | gamma correction value

Returns
  a gphoto error code

References GP_OK.