Modern Image Probing

HPDFModernImages provides bounded container and header probes for JPEG XL, AVIF/HEIF and OpenEXR, with native scanline pixel decoding for OpenEXR v2

THotPDF members

THotPDF.ProbeModernImageBytes(Data, Info) recognizes an in-memory buffer by signature — the OpenEXR magic, the JPEG XL codestream marker or an ISO-BMFF ftyp brand — and fills a THPDFModernImageInfo record with family, reject reason, dimensions, channels, bits per sample, brand, compression, box and frame counts, payload offset and bytes, and a diagnostic

THotPDF.ProbeModernImageFile(FileName, Info) runs the same probe for a file on disk and retries the family decoder chosen by extension when the content probe does not recognize the bytes

The read-only THotPDF.LastModernImageInfo property keeps the record of the most recent probe or modern-image AddImage attempt, reset before each attempt so a stale result is never observed

The THotPDF.OnDecodeModernImage event of type THPDFModernImageDecodeEvent fires when the native decoder produced no bitmap, which is always the case for JPEG XL and AVIF/HEIF; a handler returning True with a bitmap lets the file-name AddImage overloads embed those formats

THotPDF.AddImage routes the .exr, .jxl, .avif, .heif and .heic extensions through this path