ImageEn, unit imageenproc

TImageEnProc.AdjustLevels

TImageEnProc.AdjustLevels


Declaration

procedure AdjustLevels(Shadow: integer; MidTone: integer; Highlight: integer; OutShadow: integer; OutHighlight: integer);


Description

Perform level adjustment with midtone.

Note:
Null values (causing no change) would be: AdjustLevels( 0, 128, 255, 0, 255 );
A UI for this is available to your users in the Image Processing dialog
If the image PixelFormat is not ie24RGB or ie32RGB, it will be converted

Parameter Description
Shadow Low input value (0-255)
MidTone Midtone input value (0-255, 128 = linear adjustment)
Highlight High input value (0-255)
OutShadow Low output value (0-255)
OutHighlight High output value (0-255)


Demo

Demo  Demos\ImageEditing\EveryMethod\EveryMethod.dpr


Example

// Load test image
ImageEnView1.IO.LoadFromFile( 'D:\TestImage.jpg' );

  

// Shift the midpoint of the image to brighten it
ImageEnView1.Proc.AdjustLevels( 0, 102, 201, 0, 255 );