ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Append two jpgs
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

don709

Canada
2 Posts

Posted - Nov 19 2024 :  09:40:00  Show Profile  Reply
I'm new to this posting and I'm not sure if I posted correctly on my last attempt.
I'm trying to load 2 jpegs into 1 ImageEnView1
Basically one on top and one on bottom of the ImageEnView1
I've been searching for a solution but I'm having trouble figuring it out so any help would be appreciated.

Cheers

xequte

38607 Posts

Posted - Nov 19 2024 :  15:07:08  Show Profile  Reply
Hi

You have a few options here:

1. Use two layers:

  ImageEnView1.LayersAdd( ielkImage, 0, 0, ImageEnView1.ClientWidth div 2, ImageEnView1.ClientHeight );
  ImageEnView1.IO.LoadFromFile( 'D:\im.jpg' );
  TIEImageLayer( ImageEnView1.CurrentLayer ).RestoreAspectRatio();
  ImageEnView1.LayersAdd( ielkImage, ImageEnView1.ClientWidth div 2, 0, ImageEnView1.ClientWidth div 2, ImageEnView1.ClientHeight );
  ImageEnView1.IO.LoadFromFile( 'D:\im2.jpg' );
  TIEImageLayer( ImageEnView1.CurrentLayer ).RestoreAspectRatio();

http://www.imageen.com/help/TIEImageLayer.html

2. Custom draw the two images:

procedure TForm1.ImageEnView1DrawCanvas(Sender: TObject; ACanvas: TCanvas; ARect: TRect);
var
  bmp1, bmp2: TIEBitmap;
begin
  bmp1 := TIEBitmap.Create();
  bmp2 := TIEBitmap.Create();
  bmp1.LoadFromFile( 'D:\im.jpg' );
  bmp1.RenderToCanvas( ACanvas, Rect( 0, 0, ImageEnView1.ClientWidth div 2, ImageEnView1.ClientHeight ), rfFastLinear, 0, clWhite, True );
  bmp2.LoadFromFile( 'D:\im2.jpg' );
  bmp2.RenderToCanvas( ACanvas, Rect( ImageEnView1.ClientWidth div 2, 0, ImageEnView1.ClientWidth, ImageEnView1.ClientHeight ), rfFastLinear, 0, clWhite, True );
  bmp1.Free();
  bmp2.Free();
end;

http://www.imageen.com/help/TImageEnView.OnDrawCanvas.html

3. Use a TImageEnMView

http://www.imageen.com/help/TImageEnMView.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

don709

Canada
2 Posts

Posted - Nov 20 2024 :  13:19:03  Show Profile  Reply
Cheers
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: