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 18 2013 : 08:16:02
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.
2   L A T E S T    R E P L I E S    (Newest First)
bmesser Posted - Nov 23 2013 : 04:16:58
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.

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

William Miller