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
 TIEBitmap.DrawToTIEBitmap bug

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
nwscomps Posted - Sep 09 2016 : 14:50:29
Using Imageen 6.3.2 , Delphi 10.1 Berlin

procedure Test(theBmp:TIEBitmap);
var
  aIERect: TIERectangle;
  tdIEBitmap : TIEBitmap;
begin
  theBmp.PixelFormat := ie8g; //with ie24rgb it works fine

  tdIEBitmap := TIEBitmap.Create(theBmp, rect(0,0, thebmp.width-1, 200)); //this is created correctly

  aIERect.x := 0;
  aIERect.y := 50;
  aIERect.width := theBmp.Width;
  aIERect.height := 100;

  try 
    tdIEBitmap.DrawToCanvas(thebmp.Canvas, 0, 200); //this works
    
    //Wrong result if set pixel format to 8 bits!!!
    // bitmap will appear all stretched out
    tdIEBitmap.DrawToTIEBitmap(theBmp, 0, 400); //this does not work for ie8g
    
  finally
    tdIEBitmap.free;
  end;
end;


procedure TForm1.Button1Click(Sender: TObject);
begin
  if OpenImageEnDialog1.Execute then
   begin
     ImageEnView1.IO.LoadFromFile(OpenImageEnDialog1.FileName);
     Test(ImageEnView1.IEBitmap);
     imageenview1.Fit;
   end;
end;

Francesco Savastano
Nwscomps.com
Add-ons for the ImageEn Library
2   L A T E S T    R E P L I E S    (Newest First)
nwscomps Posted - Sep 15 2016 : 07:01:34
Thanks.

Francesco Savastano
Nwscomps.com
Add-ons for the ImageEn Library
xequte Posted - Sep 12 2016 : 20:00:20
Hi Francesco

Unfortunately DrawToTIEBitmap only supports ie24RGB (because it is based on RenderToTIEBitmapEx). We've updated the documentation to reflect this.

There are other ways to copy among bitmaps, like TIEBitmap.AssignRect and TIEBitmap.CopyRectTo, which supports all pixel formats.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com