THotPDF.DecodeLoadedImageStreamCached Method

Decodes a complete loaded image through the renderer's bounded cache and per-key singleflight coordinator

Declaration

function DecodeLoadedImageStreamCached(
  AImageStream: THPDFStreamObject): TBitmap;

Parameters

AImageStream is a loaded image stream owned by the current document

Return value

Returns a newly allocated TBitmap owned by the caller or nil when the stream cannot be decoded

Concurrency

Different image keys may decode concurrently while duplicate keys share one owner decode

Copy-free alternative

Use AcquireLoadedImageStream when the caller can retain an immutable handle or draw directly without a mutable bitmap copy

Related APIs

Sharded Loaded-Image Decode Cache · GetImageDecodeConcurrencyInfo