HPDFDecodeWebPLossless Function

function HPDFDecodeWebPLossless(const Data: TBytes; out Width,
  Height: Integer; out Pixels: TWebPCardinalArray): boolean;

Decodes the first VP8L (lossless) frame of a WebP byte stream per RFC 9649, returning Width * Height ARGB values ($AARRGGBB, one Cardinal per pixel in scan-line order)

The decoder implements canonical prefix codes with simple and normal code length codes, spatial meta prefix codes through the entropy image, LZ77 backward references with the 120-entry neighbourhood distance map, the multiplicative colour cache ($1e35a7bd hash), and all four inverse transforms: the 14-mode block predictor with border rules, the 3.5-fixed-point colour transform, subtract-green and colour indexing with 8/4/2/1-bit pixel bundling

Lossy VP8 frames and animations are rejected with False as an explicit unsupported boundary, as are malformed RIFF containers; HPDFDecodeWebPToBitmap and HPDFDecodeWebPFileToBitmap are bitmap convenience wrappers with the same boundary

THotPDF.AddImageFromFile accepts .webp files through this decoder for any embedding compression

THotPDF.AddImageFromFile