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
 Tiling images problem
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

bmesser

United Kingdom
234 Posts

Posted - Nov 09 2013 :  04:04:43  Show Profile  Reply
Hi

I have a load of 256x256 bitmap images that I would like to tile. The coloured bitmaps are all good but when I use the following code I end up with a final image that has some coloured tiles but a lot just in black and white (see attached image). I use the following code to do the tiling can anyone spot what I'm doing wrong?

procedure TfmMain.TileMap;
var
  col   : integer;
  row   : integer;
  xpos  : integer;
  ypos  : integer;
  iebmp : TIEBitMap;
begin
  Application.ProcessMessages;

  Screen.Cursor:=crHourGlass;

  try
    iebmp:=TIEBitMap.Create;

    try
      Image.Clear;
      Image.RemoveAllObjects;
      Image.Proc.ImageResize(5120,7680);

      ypos:=0;

      for row:=65 to 100 do
      begin
        xpos:=0;

        for col:=120 to 140 do
        begin
          iebmp:=GrabTile(8,col,row);
          iebmp.RenderToTIEBitmapEx(Image.IEBitmap,xpos,ypos,256,256,0,0,256,256,255,rfNone);
          inc(xpos,256);
        end;

        inc(ypos,256);
      end;

      Image.Fit;
    finally
      iebmp.free;
    end;
  finally
    Screen.Cursor:=crDefault;
  end;
end;


w2m

USA
1990 Posts

Posted - Nov 09 2013 :  06:01:32  Show Profile  Reply
Send your images in a zip file to me at w2m@frontiernet.net and I'll take a look.

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page

w2m

USA
1990 Posts

Posted - Nov 09 2013 :  10:18:33  Show Profile  Reply
I experimented a little bit with some 256x256 32-bit png images and found that RenderToTIEBitmapEx does NOT render black and white iebitmaps.

I could not fully duplicate your code however, because you did not include the GrabTile function and I do not have your images.

Perhaps the problem is in the GrabTile function or some of your maps are different than the maps that render correctly. I have no way of telling this of course.

William Miller
Go to Top of Page

bmesser

United Kingdom
234 Posts

Posted - Nov 11 2013 :  13:15:02  Show Profile  Reply
Bill

Did you get a copy of the function and the bitmaps I zipped up?

Bruce.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Nov 11 2013 :  14:10:01  Show Profile  Reply
Bruce... No. Nothing was received.

William Miller
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: