ImageEn, unit imageenproc

TImageEnProc.ShiftChannel

TImageEnProc.ShiftChannel


Declaration

procedure ShiftChannel(OffsetX, OffsetY: Integer; Channel: TIEChannel; FillValue: Integer);


Description

Move the specified channel by an offset, filling the blank position with a color.

Parameter Description
OffsetX Specifies the horizontal offset in pixels. This can have negative values
OffsetY Specifies the vertical offset in pixels. This can have negative values
Channel The channel to shift: iecBlue, iecGreen or iecRed
FillValue The filling color (this is the channel intensity, because ShiftChannel works on a channel at the time)

Note: If the image PixelFormat is not ie24RGB or ie48RGB, it will be converted


Demo

Demo  Demos\ImageEditing\EveryMethod\EveryMethod.dpr


Example

ImageEnView1.IO.LoadFromFile( 'D:\TestImage.jpg' );

  

// Shift to -5 horizontally and -2 vertically in the Blue channel, filling new areas with 0
ImageEnView1.Proc.ShiftChannel( -5, -2, iecBlue, 0 );

  


Compatibility Notes

In versions prior to v5.2.0, ShiftChannel() used an integer to specify the channel: 0 = iecBlue, 1 = iecGreen and 2 = iecRed