THPDFImageRecompressionCostInfo Record

Telemetry of a visual-cost image recompression pass: scanned and candidate counts, per-codec outcomes, trial and rejection counters, quality and error aggregates, and byte savings

Declaration

THPDFImageRecompressionCostInfo= record
  ScannedImageCount: Integer;
  CandidateImageCount: Integer;
  RecompressedImageCount: Integer;
  RecompressedJPEGCount: Integer;
  RecompressedJPEG2000Count: Integer;
  EncodingTrialCount: Integer;
  VisualErrorRejectionCount: Integer;
  ByteCostRejectionCount: Integer;
  SelectedQualitySum: Integer;
  MaximumSelectedPerceptualError: Double;
  BytesBefore: Int64;
  BytesAfter: Int64;
  BytesSaved: Int64;
  DeterministicSelection: boolean;
end;

Unit

HPDFDoc

Fields

FieldPurpose
ScannedImageCountImages inspected by the pass
CandidateImageCountImages that entered the quality search after eligibility checks
RecompressedImageCountImages actually re-encoded and written back
RecompressedJPEGCountRe-encoded images whose final filter is JPEG
RecompressedJPEG2000CountRe-encoded images whose final filter is JPEG 2000
EncodingTrialCountTrial encodings performed while sweeping the quality range
VisualErrorRejectionCountTrials rejected because the perceptual error exceeded the budget
ByteCostRejectionCountTrials rejected because the byte-cost weight dominated the score
SelectedQualitySumSum of the qualities chosen per recompressed image, for computing an average
MaximumSelectedPerceptualErrorHighest perceptual error among accepted recompressions
BytesBefore / BytesAfterImage stream bytes before and after the pass
BytesSavedByte difference achieved; compare with the options' minimum-savings threshold
DeterministicSelectiontrue when every reported choice came from the deterministic cost comparison

Usage notes

Related APIs