ImageEn, unit imageenproc

TImageEnProc.IntensityRGBAll

TImageEnProc.IntensityRGBAll


Declaration

procedure IntensityRGBAll(R, G, B: Integer);


Description

Adjust the RGB channels of the current image or the selected region.
R, G and B are the channel offsets, from -255 to +255.
Negative values darken all the pixels in the image. Positive values lighten all pixels in the image. To darken colors use IntensityRGBAll (-10, -10, -10). To lighten colors use IntensityRGBAll (10, 10, 10). Also see AdjustBrightnessContrastSaturation which uses a non-linear LUT to adjust the pixel colors. IntensityRGBAll adjusts the pixel colors by adding or subtracting the R, G, B values to each pixel in the image.

Notes:
- 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


Demo

Demo  Demos\ImageEditing\EveryMethod\EveryMethod.dpr


Example

// Remove the Red channel
ImageEnView1.Proc.IntensityRGBAll( -255, 0, 0 );


// Apply a Red filter (subtracts the Green and Blue channels)
ImageEnView1.Proc.IntensityRGBAll( 0, -255, -255 );


// Apply a darken filter (subtracts the same value from all channels)
ImageEnView1.Proc.IntensityRGBAll( -10, -10, -10 );


// Apply a lighten filter (adds the same value to all channels)
ImageEnView1.Proc.IntensityRGBAll( 10, 10, 10 );


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

  

// Adjust the RGB channel
ImageEnView1.Proc.IntensityRGBAll( 5, 10, 15 );