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 18 2013 :  08:16:02  Show Profile  Reply
Hi

I have posted this problem in a previous question and Bill kindly looked at it but couldn't find a solution, so I emailed it to Fabrizio who is obviously busy. I have kept trying to find a solution to the problem but despite my best efforts have still failed to come up with the answer.

Basically what I'm trying to do is to 'scrape' separate map images together from the internet and then tile them to produce a map. The problem is that the final PNG image that I end up with should be coloured but ends up being black and white. If I save the original TIEBitMap that I have constructed as a TBitMap this is saved correctly as a coloured BMP, so the problem you would think, must occur when I assign the TIEBitMap to the TImageEnView component before saving it as a PNG.

Here is my problem in pseudo code:

var
  iebmp : TIEBitMap;
  xpos  : integer;
  ypos  : integer;
  col   : integer;
  row   : integer;
  bmp   : TBitMap;
  
for row:=1 to 5 do
begin
  xpos:=0;

  for col:=1 to 5 do
  begin
    Image.IO.LoadFromURL(SomeURL);             Image.IEBitmap.RenderToTIEBitmapEx(iebmp,xpos,ypos,256,256,0,0,256,256,255,rfHermite);
    inc(xpos,256);
  end;

  inc(ypos,256);
end;

bmp:=TBitMap.Create;

try
  iebmp.CopyToTBitmap(bmp);
  bmp.SaveToFile('Image.BMP');
finally
  bmp.Free;
end;

Image.Clear;
Image.IEBitmap.Assign(iebmp);
Image.IO.SaveToFilePNG('Image.PNG');


Bruce.

w2m

USA
1990 Posts

Posted - Nov 18 2013 :  11:38:05  Show Profile  Reply
Bruce... the only other thing I can think of is to add
Image.AlphaChannel. Not sure if this will help however.

William Miller
Go to Top of Page

bmesser

United Kingdom
234 Posts

Posted - Nov 23 2013 :  04:16:58  Show Profile  Reply
Bill

I have worked around the problem. I now don't try to do it all in code for some images and do it manually in Paint.

Bruce.

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