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
 Simply JOIN two TIEBitmap horizontally or vertically?

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
PeterPanino Posted - Dec 24 2022 : 04:50:42
I have created two TIEBitmap by extracting them with CreateROIBitmap from the same TIEBitmap. Both have the same height. Now I need to JOIN them horizontally seamlessly. Is there a simple method to do this like e.g. JoinBitmaps(LeftBM, RightBM, iejHorz)?

Similarly, I need to join two TIEBitmap (having the same width) vertically, e.g. JoinBitmaps(TopBM, BottomBM, iejVert)?

It would be very helpful if such a simple helper function existed in ImageEn.
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Dec 25 2022 : 16:10:13
Hi Peter

Yes, that looks correct.

FYI, the current beta replaces IEJoinBitmaps() with TIEBitmap.JoinTo().

Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - Dec 25 2022 : 03:10:27
Hi Nigel

Thank you very much!

I wrote a quick and dirty implementation of a "CUTOUT" feature using the IEJoinBitmaps method (I have no Delphi on this computer):

procedure TForm1.ButtonClick(Sender: TObject);
begin
  var SelRect := ImageEnView1.SelectedRect; // TIERectangle
  if (SelRect.height = ImageEnView1.IEBitmap_Height) and // if whole height of the image is selected
     (SelRect.width < ImageEnView1.IEBitmap_Width)       // if less than whole width of the image is selected
  then
  begin
    var modifiedBitmap := TIEBitmap.Create;
    var leftPart := ImageEnView1.IEBitmap.CreateROIBitmap(System.Classes.Rect(0, 0, SelRect.x - 1, SelRect.height - 1));
    var rightPart := ImageEnView1.IEBitmap.CreateROIBitmap(System.Classes.Rect(SelRect.x + SelRect.width, 0,
      ImageEnView1.IEBitmap_Width - 1, SelRect.height - 1));
    iexHelperFunctions.IEJoinBitmaps(modifiedBitmap, LeftPart, RightPart, False);
    ImageEnView1.Assign(modifiedBitmap);
    ImageEnView1.Update;
    FreeAndNil(RightPart);
    FreeAndNil(LeftPart);
    FreeAndNil(modifiedBitmap);
  end;
end;


Is this correct?
xequte Posted - Dec 24 2022 : 15:58:21
Hi Peter

Please use:

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


Nigel
Xequte Software
www.imageen.com