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