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
 Tiling images problem

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 - Nov 09 2013 : 04:04:43
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;


4   L A T E S T    R E P L I E S    (Newest First)
w2m Posted - Nov 11 2013 : 14:10:01
Bruce... No. Nothing was received.

William Miller
bmesser Posted - Nov 11 2013 : 13:15:02
Bill

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

Bruce.
w2m Posted - Nov 09 2013 : 10:18:33
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
w2m Posted - Nov 09 2013 : 06:01:32
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