ImageEn, unit ievision

TIEVisionImage.max

TIEVisionImage.max


Declaration

procedure max(source1: TIEVisionImage; source2: TIEVisionImage); overload; safecall;
procedure max(source1: TIEVisionImage; source2: double); overload; safecall;


Description

Calculate the per-element maximum of two images or an image and a scalar.

Parameter Description
source1 First source image
source2 Second source image or scalar value

Note:
The source images must be the same size and color depth
You should allocate the destination image to the same size as the source images


Demo

Demo  Demos\ImageEditing\EveryMethod\EveryMethod.dpr


Example

ImageEnView1.IO.LoadFromFile( 'D:\im300a.jpg' );
ImageEnView2.IO.LoadFromFile( 'D:\im300b.jpg' );
DestIEViewer1.IEBitmap.Allocate( ImageEnView1.IEBitmap.Width, ImageEnView1.IEBitmap.Height );  // Allocate the destination image
DestIEViewer1.IEBitmap.GetIEVisionImage().max( ImageEnView1.IEBitmap.GetIEVisionImage(), ImageEnView2.IEBitmap.GetIEVisionImage() );
DestIEViewer1.Update();

// ALTERNATIVELY...
DestIEViewer1.IO.LoadFromFile( 'D:\im300a.jpg' );
ImageEnView2.IO.LoadFromFile( 'D:\im300b.jpg' );
DestIEViewer1.IEBitmap.GetIEVisionImage().max( DestIEViewer1.IEBitmap.GetIEVisionImage(), ImageEnView2.IEBitmap.GetIEVisionImage() );
DestIEViewer1.Update();