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
 Joining four tiled images

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
bmesser Posted - Dec 17 2011 : 09:46:47
Hi Fabrizio

This may not be strictly a ImageEN question but...
I would like to join four tiled images together in a grid:

12
34

I can do this in a component TImageEnMView component as thumbnails in a 2x2 grid - but I would like to hold it as a single image so I can navigate and zoom select it. I find that this is getting more and more a common thing that I want to do especially when you grab a tiled map from the internet that is comprised of multiple tiles in rows and grids. I just wonder if there is a function that I can call to "stick" the images together?

Bruce.
3   L A T E S T    R E P L I E S    (Newest First)
fab Posted - Dec 20 2011 : 13:54:29
Thank you Bruce.

Merry Christmas and best wishes for a happy new year.
bmesser Posted - Dec 20 2011 : 10:36:32
Hi Fabrizio

You are absolutely brilliant - is there nothing you can't do with your set of components?

Thanks and have a good Christmas.

Bruce.
fab Posted - Dec 19 2011 : 09:50:00
Hi Bruce,
there isn't a direct function to do it. You could follow these steps:

1) create a background image large enough to contains all tiles:
ImageEnView1.Proc.ImageResize(1000, 1000);


2) create a temporary TIEBitmap object which will load each tile and paste to the background of ImageEnView1:

  with TIEBitmap.Create() do
  begin
    try
      Read('tile0.jpg');
      RenderToTIEBitmapEx(ImageEnView1.IEBitmap, 0,0,Width,Height, 0,0,Width,Height, 255, rfNone);
      Read('tile1.jpg');
      RenderToTIEBitmapEx(ImageEnView1.IEBitmap, 500,0,Width,Height, 0,0,Width,Height, 255, rfNone);
      ...etc...
    finally
      Free();
    end;
  end;
  ImageEnView1.Update();


You can separate tiles and create frames in TImageEnMView using:
ImageENMView1.AppendSplit(ImageEnView1.IEBitmap, 500, 500);