libNeon
Loading...
Searching...
No Matches
neo::gamma_table Struct Reference

#include <gamma.hpp>

Public Types

using lut_table_t = std::array< std::uint8_t, std::numeric_limits< std::uint8_t >::max()+1 >
 

Public Member Functions

 gamma_table ()=default
 
 gamma_table (lut_table_t lut_)
 
std::uint8_t operator[] (std::uint8_t v) const
 
std::uint8_t reverse_lookup (std::uint8_t v) const
 

Static Public Member Functions

static gamma_table build (float gamma)
 

Public Attributes

lut_table_t lut = {}
 

Member Typedef Documentation

◆ lut_table_t

using neo::gamma_table::lut_table_t = std::array<std::uint8_t, std::numeric_limits<std::uint8_t>::max() + 1>

Constructor & Destructor Documentation

◆ gamma_table() [1/2]

neo::gamma_table::gamma_table ( )
default

◆ gamma_table() [2/2]

neo::gamma_table::gamma_table ( lut_table_t  lut_)
inlineexplicit

Member Function Documentation

◆ build()

gamma_table neo::gamma_table::build ( float  gamma)
static

Builds a lookup gamma table from sRGB values to the corresponding gamma-corrected intensity values. The returned table implements essentially gamma(srgb_to_linear(v)).

◆ operator[]()

std::uint8_t neo::gamma_table::operator[] ( std::uint8_t  v) const
inline

◆ reverse_lookup()

std::uint8_t neo::gamma_table::reverse_lookup ( std::uint8_t  v) const
Note
This bisects lut, so it's very slow.

Member Data Documentation

◆ lut

lut_table_t neo::gamma_table::lut = {}

The documentation for this struct was generated from the following files: