ImageEn, unit ievect

TImageEnVect.SetObjBitmapFromFile

TImageEnVect.SetObjBitmapFromFile


Declaration

function SetObjBitmapFromFile(hobj: integer; const FileName: WideString): boolean;


Description

SetObjBitmapFromFile loads an image from FileName and assigns it to the hobj bitmap object.

It returns true if a file is successfully loaded.
This function also loads and assigns the alpha channel if present.

IEV_PREVIOUS_INSERTED_OBJECT can be specified for hobj to refer to the object that was last inserted.


Example

ImageEnVect1.SetObjBitmapFromFile(IEV_NEXT_INSERTED_OBJECT, 'image.gif' );
ImageEnVect1.ObjKind[IEV_NEXT_INSERTED_OBJECT] := iekBitmap;
ImageEnVect1.AddNewObject();


Transition Information

If you are transitioning your code to TImageEnView Layers, instead of SetObjBitmapFromFile, use: TIELayer.Bitmap

ImageEnView1.CurrentLayer.Bitmap.LoadFromFile( 'image.gif' );