Actions

GFL Colors

From XnView Wiki

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

gflBrigthness

The gflBrigthness function increases or decreases the brightness of a picture.

GFL_ERROR gflBrigthness(
  GFL_BITMAP* src,  
  GFL_BITMAP** dst,  
  GFL_INT32 brightness
);

Parameters

src
Pointer to a GFL_BITMAP structure.
dst
Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.
brightness
An integer between -255 and 255.

Return value

The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.

gflContrast

The gflContrast function increases or decreases the contrast of a picture.

GFL_ERROR gflContrast(
  GFL_BITMAP* src,  
  GFL_BITMAP** dst,  
  GFL_INT32 contrast
);

Parameters

src
Pointer to a GFL_BITMAP structure.
dst
Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.
contrast
An integer between -127 and 127.

Return value

The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.

gflGamma

The gflGamma function increases or decreases the gamma of a picture.

GFL_ERROR gflGamma(
  GFL_BITMAP* src,  
  GFL_BITMAP** dst,  
  double gamma
);

Parameters

src
Pointer to a GFL_BITMAP structure.
dst
Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.
gamma
A number between 0.01 and 5.

Return value

The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.

gflAdjust

The gflAdjust function allows to adjust brightness, contrast & gamma of a picture.

GFL_ERROR gflAdjust(
  GFL_BITMAP* src,  
  GFL_BITMAP** dst,  
  GFL_INT32 brightness,  
  GFL_INT32 contrast,  
  double gamma
);

Parameters

src
Pointer to a GFL_BITMAP structure.
dst
Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.
brightness
An integer between -255 and 255.
contrast
An integer between -127 and 127.
gamma
A number between 0.01 and 5.

Return value

The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.


gflAdjustHLS

The gflAdjustHLS function allows to adjust the hue, lightness & saturation of a picture.

GFL_ERROR gflAdjustHLS(
  GFL_BITMAP* src,  
  GFL_BITMAP** dst,  
  GFL_INT32 h_increment,  
  GFL_INT32 l_increment,  
  GFL_INT32 s_increment
);

Parameters

src
Pointer to a GFL_BITMAP structure.
dst
Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.
h_increment
An interger between -100 and 100 to add to the hue value.
l_increment
An interger between -100 and 100 to add to the lightness value.
s_increment
An interger between -100 and 100 to add to the saturation value.

Return value

The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.


gflNegative

The gflNegative function applies the negative of a picture.

GFL_ERROR gflNegative(
  GFL_BITMAP* src,  
  GFL_BITMAP** dst
);

Parameters

src
Pointer to a GFL_BITMAP structure.
dst
Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.

Return value

The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.

gflLogCorrection

The gflLogCorrection function applies a logarithmic correction on a picture.

GFL_ERROR gflLogCorrection(
  GFL_BITMAP* src,  
  GFL_BITMAP** dst
);

Parameters

src
Pointer to a GFL_BITMAP structure.
dst
Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.

Return value

The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.


gflNormalize

The gflNormalize function applies a normalisation of the pixels values.

GFL_ERROR gflNormalize(
 GFL_BITMAP* src,  
 GFL_BITMAP** dst
);

Parameters

src
Pointer to a GFL_BITMAP structure.
dst
Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.

Return value

The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.

gflEqualize

The gflEqualize function applies an equalization of the pixels.

GFL_ERROR gflEqualize(
  GFL_BITMAP* src,  
  GFL_BITMAP** dst
);

Parameters

src
Pointer to a GFL_BITMAP structure.
dst
Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.

Return value

The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.


gflEqualizeOnLuminance

The gflEqualizeOnLuminance function applies an equalization of the pixels (based on the luminance).

GFL_ERROR gflEqualizeOnLuminance(
  GFL_BITMAP* src,  
  GFL_BITMAP** dst
);

Parameters

src
Pointer to a GFL_BITMAP structure.
dst
Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.

Return value

The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.

gflBalance

The gflBalance function applies a color balance of a picture.

GFL_ERROR gflBalance(
  GFL_BITMAP* src,  
  GFL_BITMAP** dst,  
  const GFL_COLOR* color
);

Parameters

src
Pointer to a GFL_BITMAP structure.
dst
Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.
color
Pointer to a GFL_COLOR structure.

Return value

The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.


gflSwapColors

The gflSwapColors function allows to swap component.

GFL_ERROR gflSwapColors(
  GFL_BITMAP* src,  
  GFL_BITMAP** dst,  
  GFL_SWAPCOLORS_MODE mode
);

Parameters

src
Pointer to a GFL_BITMAP structure.
dst
Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.
mode
GFL_SWAPCOLORS_RBG 0
GFL_SWAPCOLORS_BGR 1
GFL_SWAPCOLORS_BRG 2
GFL_SWAPCOLORS_GRB 3
GFL_SWAPCOLORS_GBR 4

Return value

The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.


gflSepia

The gflSepia function converts a picture in sepia.

GFL_ERROR gflSepia(
  GFL_BITMAP* src,  
  GFL_BITMAP** dst,  
  GFL_INT32 percent
);

Parameters

src
Pointer to a GFL_BITMAP structure.
dst
Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.
percent
An integer between 0 and 100.
0 => greyscale, 100 => maximum sepia

Return value

The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.

gflSepiaEx

The gflSepiaEx function converts a picture in sepia.

GFL_ERROR gflSepiaEx(
  GFL_BITMAP* src,  
  GFL_BITMAP** dst,  
  GFL_INT32 percent,  
  const GFL_COLOR* color
);

Parameters

src
Pointer to a GFL_BITMAP structure.
dst
Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.
percent
An integer between 0 and 100.
0 => greyscale, 100 => maximum sepia
color
Pointer to a GFL_COLOR structure.
This color is used as a reference.

Return value

The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.


gflAutomaticLevels

The gflAutomaticLevels function applies an automatic equalisation of levels.

GFL_ERROR gflAutomaticLevels(
  GFL_BITMAP* src,  
  GFL_BITMAP** dst
);

Parameters

src
Pointer to a GFL_BITMAP structure.
dst
Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.

Return value

The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.


gflAutomaticContrast

The gflAutomaticContrast function adjusts the contrast of picture.

GFL_ERROR gflAutomaticContrast(
  GFL_BITMAP* src,  
  GFL_BITMAP** dst
);

Parameters

src
Pointer to a GFL_BITMAP structure.
dst
Address of a pointer to a GFL_BITMAP structure. NULL if on the same instance.

Return value

The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.