ImageEn, unit iemview

TImageEnMView.ReleaseBitmap

TImageEnMView.ReleaseBitmap


Declaration


procedure ReleaseBitmap(idx: Integer; saveChanges: Boolean = true);


Description


Releases the bitmap created with GetBitmap or GetTIEBitmap method.

Parameter Description
idx The image index to release.
saveChanges If true (default) the bitmap will be written in the cache.



Example


// Save the fifth image to file
bmp := ImageEnMView1.GetTIEBitmap(4); // Note: bmp must be TIEBitmap type
bmp.Write('D:\alfa.png');
ImageEnMView1.ReleaseBitmap(4, False);

// Add copyright text to all images
for i := 0 to ImageEnMView1.ImageCount - 1 do
begin
  bmp := ImageEnMView1.GetTIEBitmap( i );
  with TImageEnProc.CreateFromBitmap( bmp ) do
  begin
    ConvertTo24Bit();
    TextOut(Align_Text_Horz_Center, Align_Text_Near_Bottom, 'Copyright Skynet', 'Arial', 25, clRed, [fsBold], 0, True);
    Free;
  end;

  ImageEnMView1.ReleaseBitmap( i, True );
  ImageEnMView1.Update();
end;