Reduced-DCT JPEG Decoding
HotPDF decodes low-resolution DCTDecode targets without allocating a full-resolution raster
Scale selection
The decoder selects the largest supported inverse-DCT denominator from 8, 4, 2, and 1 whose output still covers the requested target
Images whose source dimensions do not end on MCU boundaries use denominator 1 so padded edge samples cannot contaminate the visible crop
Bounded resampling
A fixed-point box resampler consumes one decoded scanline at a time and writes directly into the exact target bitmap
Working storage is bounded by the decoder-reported scaled width, the target width, and the output bitmap rather than by source raster dimensions
Cancellation is checked inside the scanline loop and all output sizes remain subject to the document decode budget
Renderer integration
DecodeLoadedImageRegionAtResolution and low-resolution page rendering automatically use this path for compatible greyscale and RGB JPEG streams
The same reduced request and telemetry cross the codec worker boundary when codec isolation is enabled
Direct decoder
THPDFJpegReducedDecoder exposes the bounded decoder for callers that already hold encoded JPEG bytes
GetLastJPEGReducedDecodeInfo reports the most recent document-integrated request