The two options below should produce the same result. However, with the "Test.bmp" file attached as the Input ABitmap, option A produces a blank bmp while option B produces the correct result.
procedure TEST_BITMAP(ABitmap: TBitmap);
var
MB: TIEMultiBitmap;
B: TIEBitmap;
begin
//Option A
B := TIEBitmap.Create;
try
B.CopyFromTBitmap(ABitmap);
B.SaveToFile('D:\Test5\TestA.bmp');
finally
B.Free;
end;
//Option B
MB := TIEMultiBitmap.Create;
try
MB.InsertImage(0, ABitmap);
B := MB.GetTIEBitmap(0);
B.SaveToFile('D:\Test5\TestB.bmp');
finally
MB.ReleaseBitmap(0, False);
MB.Free;
end;
end;
attach/jeffp/20268416431_TestBitmap.zip
6432.53 KB
jp