Defines

Image Enhance Utilities in Lua
[Image Processing]

Collaboration diagram for Image Enhance Utilities in Lua:

Defines

#define imImageGamma(_image, _gamma)   { float params[1]; params[0] = _gamma; imProcessToneGamut(_image, _image, IM_GAMUT_POW, params); }
#define imImageBrightnessContrast(_image, _bright_shift, _contrast_factor)   { float _params[2]; _params[0] = bright_shift; _params[1] = contrast_factor; imProcessToneGamut(_image, _image, IM_GAMUT_BRIGHTCONT, _params); }
#define imImageLevel(_image, _start, _end)   { float _params[2]; _params[0] = _start; _params[1] = _end; imProcessToneGamut(_image, _image, IM_GAMUT_EXPAND, _params); }
#define imImageEqualize(_image)   imProcessEqualizeHistogram(_image, _image)
#define imImageNegative(_image)   imProcessNegative(_image, _image)
#define imImageAutoLevel(_image, _percent)   imProcessExpandHistogram(_image, _image, _percent)

Detailed Description

Operations are done in-place. Limitations are the same of the original functions.
See im_process_pnt.h

Define Documentation

#define imImageGamma (   _image,
  _gamma 
)    { float params[1]; params[0] = _gamma; imProcessToneGamut(_image, _image, IM_GAMUT_POW, params); }

Same as imProcessToneGamut using IM_GAMUT_POW.

image:Gamma(gamma) [in Lua 5] 
#define imImageBrightnessContrast (   _image,
  _bright_shift,
  _contrast_factor 
)    { float _params[2]; _params[0] = bright_shift; _params[1] = contrast_factor; imProcessToneGamut(_image, _image, IM_GAMUT_BRIGHTCONT, _params); }

Same as imProcessToneGamut using IM_GAMUT_BRIGHTCONT.

image:BrightnessContrast(bright_shift, contrast_factor: number)   [in Lua 5] 
#define imImageLevel (   _image,
  _start,
  _end 
)    { float _params[2]; _params[0] = _start; _params[1] = _end; imProcessToneGamut(_image, _image, IM_GAMUT_EXPAND, _params); }

Same as imProcessToneGamut using IM_GAMUT_EXPAND.

image:Level(start, end)  [in Lua 5] 
#define imImageEqualize (   _image  )     imProcessEqualizeHistogram(_image, _image)

Same as imProcessEqualizeHistogram.

image:Equalize()  [in Lua 5] 
#define imImageNegative (   _image  )     imProcessNegative(_image, _image)

Same as imProcessNegative. Also same as imProcessToneGamut using IM_GAMUT_INVERT.

image:Negative()  [in Lua 5] 
#define imImageAutoLevel (   _image,
  _percent 
)    imProcessExpandHistogram(_image, _image, _percent)

Same as imProcessExpandHistogram.

image:AutoLevel(percent)  [in Lua 5]