RegisterModernImageDecoderBackend

Image handling, Configuration

Description

Installs a custom decoder callback that takes over all modern image decoding

The callback receives the input stream, an output PNG stream, the sniffed format and the orientation flag; returning True means the output holds a complete PNG

Syntax

Delphi

Procedure RegisterModernImageDecoderBackend(
  Backend: TPDFlibModernImageDecodeCallback);

Parameters

BackendCallback matching TPDFlibModernImageDecodeCallback; Nil is accepted and clears the registration

Remarks

Registration is guarded by the backend lock and replaces any previously registered callback

While a callback is installed the native codec library is bypassed entirely, which keeps deployments free of external modules; call ClearModernImageDecoderBackend to drop back to the codec path

See also

ClearModernImageDecoderBackend, DecodeModernImageToPNG, DetermineModernImageFormat, ModernImageCodecAvailable