ImageEn, unit imageenproc |
|
TImageEnProc.SetFromRGBChannels
Declaration
procedure SetFromRGBChannels(BitmapR, BitmapG, BitmapB: TIEBitmap);
Description
Creates an image from R, G and B channel bitmaps, e.g. as created by
GetRGBChannel (all existing content will be cleared).
BitmapR, BitmapG and BitmapB must be the same size and ie24RGB. They should be gray-scale.
| Demos\ImageEditing\RGBChannels\RGBChannels.dpr |
| Demos\ImageEditing\EveryMethod\EveryMethod.dpr |
ImageEnView1.Proc.GetRGBChannel( ImageEnViewRed.IEBitmap, ImageEnViewGreen.IEBitmap, ImageEnViewBlue.IEBitmap );
ImageEnViewRed.Update();
ImageEnViewGreen.Update();
ImageEnViewBlue.Update();
... Modify the content of ImageEnViewRed, ImageEnViewGreen or ImageEnViewBlue
ImageEnView1.Proc.SetFromRGBChannels( ImageEnViewRed.IEBitmap, ImageEnViewGreen.IEBitmap, ImageEnViewBlue.IEBitmap );
Example 2
// Load test image
ImageEnView1.IO.LoadFromFile( 'D:\TestImage.jpg' );
// Flip the red channel vertically and the blue channel horizontally of an image
bmpR := TIEBitmap.Create;
bmpG := TIEBitmap.Create;
bmpB := TIEBitmap.Create;
ImageEnView1.Proc.GetRGBChannelAll( bmpR, bmpG, bmpB );
bmpR.Flip( fdVertical );
bmpB.Flip( fdHorizontal );
ImageEnView1.Proc.SetFromRGBChannels( bmpR, bmpG, bmpB );
bmpR.Free;
bmpG.Free;
bmpB.Free;