SetModernImageCodecLibraryPath

Image handling, Configuration

Description

Points the native modern-image codec loader at an explicit library file or directory

The path is stored for the next load attempt; once a codec module has been loaded the setting is refused, because the process hangs on to the loaded module until shutdown

Syntax

Delphi

Function SetModernImageCodecLibraryPath(
  Const FileNameOrDirectory: WideString): Boolean;

Parameters

FileNameOrDirectoryFull path of the codec library, or a directory the loader searches

Return values

FalseA codec module is already loaded; the stored path stays unchanged
TrueThe path was stored and will drive the next load attempt

Remarks

This is the unit-level twin of SetModernImageCodecLibrary on TPDFlib, returning a Boolean instead of a status code

Call it before the first modern image decode; ModernImageCodecAvailable then confirms whether the module at that path exposes the required API surface

See also

SetModernImageCodecLibrary, ModernImageCodecAvailable, ClearModernImageDecoderBackend, AddModernImageFromFile