Video display and composing engine for JUCE
Loading...
Searching...
No Matches
ColourCurve Class Reference

The ColourCurve provides an 8-bit lookup table to manipulate brightness, contrast and gamma correction per channel. More...

#include <foleys_ColourLookuptables.h>

Public Member Functions

 ColourCurve ()=default
 
void calculateColourMap (double newBrightness, double newContrast, double newGamma)
 calculateColourMap will set up the lookup table.
 
bool isLinear () const
 The method isLinear returns true, if the curve is the identity function.
 
void applyLUT (juce::Image &image, int component)
 Applies a ColourCurve to a channel of an image.
 
const uint8_t * getLookupTable () const
 This methods gives you reading access to the lookup table.
 

Static Public Member Functions

static void applyLUTs (juce::Image &image, const ColourCurve &red, const ColourCurve &green, const ColourCurve &blue)
 Applies a set of ColourCurves to an image.
 
static void applyLUTs (juce::Image &image, const ColourCurve &red, const ColourCurve &green, const ColourCurve &blue, const ColourCurve &alpha)
 Applies a set of ColourCurves to an image.
 

Detailed Description

The ColourCurve provides an 8-bit lookup table to manipulate brightness, contrast and gamma correction per channel.

Constructor & Destructor Documentation

◆ ColourCurve()

ColourCurve ( )
default

Member Function Documentation

◆ calculateColourMap()

void calculateColourMap ( double  newBrightness,
double  newContrast,
double  newGamma 
)

calculateColourMap will set up the lookup table.

Parameters
newBrightnesswill add or subtract a normalised value (-1..1)
newContrastmultiplies the slope of the curve (-1..1)
newGammathe gamma value for the curve (0.1..4.0)

References ColourCurve::isLinear().

Referenced by ColourCurveVideoProcessor::processFrame().

◆ isLinear()

bool isLinear ( ) const

The method isLinear returns true, if the curve is the identity function.

Referenced by ColourCurve::calculateColourMap(), and ColourCurveVideoProcessor::processFrame().

◆ applyLUT()

void applyLUT ( juce::Image &  image,
int  component 
)

Applies a ColourCurve to a channel of an image.

Parameters
imagethe image to apply the ColourCurve
componentis the index of the channel in the packed pixel

Referenced by ColourCurveVideoProcessor::processFrame().

◆ applyLUTs() [1/2]

static void applyLUTs ( juce::Image &  image,
const ColourCurve red,
const ColourCurve green,
const ColourCurve blue 
)
static

Applies a set of ColourCurves to an image.

This method assumes BGR or BGRA format.

Parameters
imagethe image to apply the ColourCurve
redis the ColourCurve for the red channel
greenis the ColourCurve for the green channel
blueis the ColourCurve for the blue channel

References ColourCurve::getLookupTable().

Referenced by ColourCurveVideoProcessor::processFrame().

◆ applyLUTs() [2/2]

static void applyLUTs ( juce::Image &  image,
const ColourCurve red,
const ColourCurve green,
const ColourCurve blue,
const ColourCurve alpha 
)
static

Applies a set of ColourCurves to an image.

This method assumes BGRA format.

Parameters
imagethe image to apply the ColourCurve
redis the ColourCurve for the red channel
greenis the ColourCurve for the green channel
blueis the ColourCurve for the blue channel
alphais the ColourCurve for the alpha channel

References ColourCurve::getLookupTable().

◆ getLookupTable()

const uint8_t * getLookupTable ( ) const

This methods gives you reading access to the lookup table.

Referenced by ColourCurve::applyLUTs(), and ColourCurve::applyLUTs().


The documentation for this class was generated from the following file: