Creates a lookup table to be used with AdjustCurve() which may adjusts brightness and contrast, correct gamma and invert the image with a single call to AdjustCurve().

Namespace:  FreeImageAPI
Assembly:  FreeImageNET (in FreeImageNET.dll)

Syntax

C#
public static int GetAdjustColorsLookupTable(
	byte[] lookUpTable,
	double brightness,
	double contrast,
	double gamma,
	bool invert
)
Visual Basic (Declaration)
Public Shared Function GetAdjustColorsLookupTable ( _
	lookUpTable As Byte(), _
	brightness As Double, _
	contrast As Double, _
	gamma As Double, _
	invert As Boolean _
) As Integer
Visual C++
public:
static int GetAdjustColorsLookupTable(
	array<unsigned char>^ lookUpTable, 
	double brightness, 
	double contrast, 
	double gamma, 
	bool invert
)

Parameters

lookUpTable
Type: array< System..::.Byte >[]()[]
Output lookup table to be used with AdjustCurve(). The size of lookUpTable is assumed to be 256.
brightness
Type: System..::.Double
Percentage brightness value where -100 <= brightness <= 100.

A value of 0 means no change, less than 0 will make the image darker and greater than 0 will make the image brighter.

contrast
Type: System..::.Double
Percentage contrast value where -100 <= contrast <= 100.

A value of 0 means no change, less than 0 will decrease the contrast and greater than 0 will increase the contrast of the image.

gamma
Type: System..::.Double
Gamma value to be used for gamma correction.

A value of 1.0 leaves the image alone, less than one darkens it, and greater than one lightens it.

invert
Type: System..::.Boolean
If set to true, the image will be inverted.

Return Value

The number of adjustments applied to the resulting lookup table compared to a blind lookup table.

Exceptions

ExceptionCondition
System..::.ArgumentNullException lookUpTable is null.
System..::.ArgumentException lookUpTable.Length is not 256.

Version Information

FreeImage.NET

Supported in: 3.11.0, 3.12.0, 3.13.0, 3.13.1

See Also