THotPDF.DownsampleLoadedImages Method

Measures every image use through page and nested Form matrices, then resamples only images whose stored pixels exceed the target effective DPI

Declaration

function DownsampleLoadedImages(TargetDPI: Integer;
    JPEGQuality: TJPEGQualityRange; MinimumSavingsBytes: Int64;
    out AInfo: THPDFLoadedResourceOptimizationInfo): Integer;

Color and alpha

Source pixels pass through the loaded image decoder and its ICC handling, while a soft mask is losslessly resized and committed with its owning image

Convertible calibrated source images retain calibrated RGB output semantics after resampling, while unsupported calibrated inputs, Separation and DeviceN images are skipped to preserve their color identity

Resource and Image Optimization