ImageEn, unit iesettings

TIEGlobalSettings.RegisterPlugIns

TIEGlobalSettings.RegisterPlugIns


Declaration

function RegisterPlugIns(PlugIns: TIEPlugIns = []; const IEVisionUserEmail: WideString = ''; const IEVisionUserSerial: WideString = ''; ExeFolderOnly: Boolean = True): TIEPlugIns; overload;
function RegisterPlugIns(const DLLPath: string; PlugIns: TIEPlugIns = []; const IEVisionUserEmail: WideString = ''; const IEVisionUserSerial: WideString = ''): TIEPlugIns; overload;


Description

Registers all available plug-in DLLs to add image formats and advanced functionality to ImageEn.
Parameter Description
PlugIns Which plug-ins to check for and load, or [] for all
DLLPath Optionally, specify the folder containing the add-in DLLs (if not the EXE folder or system path)
IEVisionUserEmail, IEVisionUserSerial If you have purchased IEVision specify your email and serial number. Leave blank to run IEVision in trial mode
ExeFolderOnly Whether to search only the EXE folder or the system path for plug-ins. Setting to false may make the method much slower

You should call RegisterPlugIns once in your application (ideally at application start-up). There is no risk to calling RegisterPlugIns() multiple times.

The following plug-ins are loaded if available:
Plug-In Const Description
IELib iepiIELib Loading of Camera Raw formats, and faster load performance for JPEG, PNG and JPEG2000
IEVision iepiIEVision Advanced functionality plug-in
IELang iepiLanguages Localization of the ImageEn user interface and actions in over twenty languages
PDFium iepiPDFium Viewing and editing of PDF documents
ImageMagick iepiImageMagick Support for a wider range of image formats (supports both installed and DLL-only versions)
SevenZip iepiSevenZip Support for ZIP files
WebP iepiWebP Loading and saving of WebP files

Most are included in the \DLL\ sub-folder where you installed ImageEn. Other plug-ins can be downloaded from:
www.imageen.com/download/

Result is equivalent to: ActivePlugIns

Note:
If loading fails, you can get debugging information from: DLLLoadingLog
The expected version of IELib/IEVision is available from: ImageEnVersion.IELibVersionStr
Registering of the IELib, IELang and PDFium plug-ins is optional as they will be automatically registered when they are first needed (if found in your EXE folder)
To register the legacy ImageMagick plug-In, ImageMagick.dll use: IEAddExtIOPlugIn


Example

// Register all available plug-ins
IEGlobalSettings().RegisterPlugIns();

// Register all available plug-in DLLs found in alternative folder
IEGlobalSettings().RegisterPlugIns( 'C:\ImageEnPlugIns\' );

// Register all available plug-ins (IEVision user)
IEGlobalSettings().RegisterPlugIns( [], 'me@mycompany.com', 'ievis-12345-67890-12345-67890-12345-67890' );

// Register only IEVision
IEGlobalSettings().RegisterPlugIns( [iepiIEVision], 'me@mycompany.com', 'ievis-12345-67890-12345-67890-12345-67890' );
if not ( iepiIEVision in IEGlobalSettings().ActivePlugIns ) then
begin
  ShowMessage( 'This application requires the ievision.dll plug-in, v' + IEGlobalSettings().ImageEnVersion.IELibVersionStr +'. Please download it from www.imageen.com' );
  exit;
end;

// Register the PDFium Plug-In DLL and show a warning if not found
IEGlobalSettings().RegisterPlugIns([ iepiPDFium ]);
if not ( iepiPDFium in IEGlobalSettings().ActivePlugIns ) then
  ShowMessage( 'PDF DLL not found. Please reinstall.' );

// Change language to Italian and show warning if language dll is not found
IEGlobalSettings().RegisterPlugIns([ iepiLanguages ]);
if not ( iepiLanguages in IEGlobalSettings().ActivePlugIns ) then
  ShowMessage( 'IELang32.dll not found. Please reinstall.' )
else
  IEGlobalSettings().MsgLanguage := msItalian;

// Register plug-ins from different folders under the EXE folder
IEGlobalSettings().RegisterPlugIns( '.\MagickDLL\', [ iepiImageMagick ]);
IEGlobalSettings().RegisterPlugIns( '.\PdfiumDLL\', [ iepiPDFium ]);
IEGlobalSettings().RegisterPlugIns( '.\IELangDLL\', [ iepiLanguages ]);

// Register IEVision DLL with a custom filename (renamed XyzViz.DLL)
IEGlobalSettings().RegisterPlugIns( 'C:\Program Files\MyApp\XyzViz.DLL', [iepiIEVision], 'me@mycompany.com', 'ievis-12345-67890-12345-67890-12345-67890' );

// Output logging information for DLL registration
IEGlobalSettings().DLLLoadingLogEnabled := True;
IEGlobalSettings().RegisterPlugIns();
memLog.Text := IEGlobalSettings().DLLLoadingLog;


See Also

ActivePlugIns
DLLLoadingLog
ImageEnVersion.IELibVersionStr
LoadSerialFromRegistry