ImageEn, unit iexHelperFunctions |
|
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).
Both bitmaps must be ie24RGB/pf24bit.
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 );
// Create a PDF document with two stacked landscape images
bmp1 := TIEBitmap.Create();
bmp2 := TIEBitmap.Create();
destBmp := TIEBitmap.Create();
bmp1.Read( 'D:\im1.jpg' );
bmp2.Read( 'D:\im2.jpg' );
IEJoinBitmaps( destBmp, bmp1, bmp2, True, clWhite );
destBmp.ParamsEnabled := True;
destBmp.Params.PDF_PaperSize := iepA4;
destBmp.Params.PDF_Compression := ioPDF_Jpeg;
destBmp.Write('D:\out.pdf');
bmp1.Free();
bmp2.Free();
destBmp.Free();