ImageEn, unit iemview

TImageEnMView.GetTIEBitmap

TImageEnMView.GetTIEBitmap


Declaration


function GetTIEBitmap(idx: Integer; FullResolution: Boolean = False): TIEBitmap;


Description


Creates a TIEBitmap object from the image at index, idx.
Any changes you make to the bitmap will be visible after you call the Update method.
You will need to call ReleaseBitmap to free the TIEBitmap object.
If FullResolution is true, it returns the full size of the image rather than a thumbnail, even if StoreType is ietThumb or ietFastThumb.


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;