ImageEn, unit iexHelperFunctions

IEJoinBitmaps

IEJoinBitmaps


Declaration


procedure IEJoinBitmaps(Dest: TIEBitmap; Src1, Src2: TIEBitmap; Vertical: Boolean; BGColor: TColor = clBlack); overload;
procedure IEJoinBitmaps(Dest: TBitmap; Src1, Src2: TBitmap; Vertical: Boolean; BGColor: TColor = clBlack); overload;


Description


Creates a single bitmap by drawing two bitmaps side-by-side (or above-and-below if Vertical is true)


Examples


// Display in ImageEnView3 the joined images of two source ImageEnViews
procedure TMain.Button1Click(Sender: TObject);
begin
  ImageEnView1.IO.LoadFromFile( 'D:\Image1.jpg' );
  ImageEnView2.IO.LoadFromFile( 'D:\Image2.bmp' );

  IEJoinBitmaps( ImageEnView3.IEBitmap, ImageEnView1.IEBitmap, ImageEnView2.IEBitmap, False );
  ImageEnView3.Update();
end;

// Load 2 bitmaps from file and save as joined
bmp1 := TIEBitmap.Create;
bmp2 := TIEBitmap.Create;
bmp3 := TIEBitmap.Create;
bmp1.Read( 'D:\Image1.jpg' );
bmp2.Read( 'D:\Image2.jpg' );
IEJoinBitmaps( bmp3, bmp1, bmp2, False, clWhite );
bmp3.Write( 'D:\Joined.jpg' );
FreeAndNil( bmp1 );
FreeAndNil( bmp2 );
FreeAndNil( bmp3 );