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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Append two jpgs

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
don709 Posted - Nov 19 2024 : 09:40:00
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

2   L A T E S T    R E P L I E S    (Newest First)
don709 Posted - Nov 20 2024 : 13:19:03
Cheers
xequte Posted - Nov 19 2024 : 15:07:08
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