THotPDF.RecompressLoadedJPEGImages Method
Decodes eligible DCT images and adopts a new JPEG stream only when the minimum savings policy is met
Declaration
function RecompressLoadedJPEGImages(Quality: TJPEGQualityRange;
EligibleColorSpaces: THPDFOptimizationColorSpaces;
MinimumSavingsBytes: Int64;
out AInfo: THPDFLoadedResourceOptimizationInfo): Integer;
Safety
Image masks and color-key masks are left unchanged while soft-mask references remain attached
Three-component ICCBased, CalGray and CalRGB inputs are color converted and written with an explicit calibrated RGB color space after rendering, while Lab, non-RGB ICCBased, Separation and DeviceN images are left unchanged
PreservedCalibratedImageCount, SkippedCalibratedImageCount and SkippedSpotColorImageCount expose these decisions in THPDFLoadedResourceOptimizationInfo