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
 Joining four tiled images
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

bmesser

United Kingdom
234 Posts

Posted - Dec 17 2011 :  09:46:47  Show Profile  Reply
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.

fab

1310 Posts

Posted - Dec 19 2011 :  09:50:00  Show Profile  Reply
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);


Go to Top of Page

bmesser

United Kingdom
234 Posts

Posted - Dec 20 2011 :  10:36:32  Show Profile  Reply
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.
Go to Top of Page

fab

1310 Posts

Posted - Dec 20 2011 :  13:54:29  Show Profile  Reply
Thank you Bruce.

Merry Christmas and best wishes for a happy new year.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: