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 changed bitmap will be updated in the control (i.e. set to False if you didn't change the bitmap, or don't need to save your changes) |
// Save the fifth image to file
bmp := ImageEnMView1.GetTIEBitmap(4); // Note: bmp must be TIEBitmap type
bmp.SaveToFile('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 );
end;
ImageEnMView1.Update();
// Rotate selected images right (90° clockwise)
for i := 0 to ImageEnMView1.ImageCount - 1 do
if ImageEnMView1.IsSelected( i ) then
begin
bmp := ImageEnMView1.GetTIEBitmap( i );
bmp.Rotate( 270 );
ImageEnMView1.ReleaseBitmap( i, True );
end;
ImageEnMView1.Update();