Hi
GetBitmap converts the internal storage of images to TBitmap, which has poor memory handling.
You are better to use TImageEnMView1.GetTIEBitmap. If you need a TBitmap use TIEBitmap.CopyToTBitmap to copy the result to your bitmap.
const
USE_GETBITMAP = False;
var
I: Integer;
bmp: TBitmap;
iebmp: TIEBitmap;
begin
for I := 0 to ImageEnMView1.ImageCount - 1 do
begin
bmp := nil;
try
Caption := IntToStr( i ) + ' - ' + ImageEnMView1.ImageFilename[i];
if USE_GETBITMAP then
bmp := ImageEnMView1.GetBitmap(I)
else
begin
bmp := TBitmap.Create;
iebmp := ImageEnMView1.GetTIEBitmap(I);
iebmp.CopyToTBitmap( bmp );
end;
// do somethign with bmp...
finally
if not USE_GETBITMAP then
FreeAndNil( bmp );
ImageEnMView1.ReleaseBitmap(I, False);
end;
end;
MessageBeep(0);
end;
Nigel
Xequte Software
www.imageen.com