THPDFImageRecompressionCostOptions Record

Tunes the visual-cost image recompression search: quality range and step, perceptual error budget, visual and byte-cost weights, minimum savings, and sampling stride

Declaration

THPDFImageRecompressionCostOptions= record
  MinimumQuality: Integer;
  MaximumQuality: Integer;
  QualityStep: Integer;
  MaximumPerceptualError: Double;
  VisualErrorWeight: Double;
  ByteCostWeight: Double;
  MinimumSavingsBytes: Int64;
  SampleStride: Integer;
  class function Default: THPDFImageRecompressionCostOptions; static;
end;

Unit

HPDFDoc

Fields

FieldPurpose
MinimumQualityLower bound of the swept quality range; default 30
MaximumQualityUpper bound of the swept quality range; default 90
QualityStepIncrement between trial qualities; default 10
MaximumPerceptualErrorPerceptual error a candidate must not exceed to be accepted; default 3.0
VisualErrorWeightWeight of the perceptual-error term in the cost score; default 1.0
ByteCostWeightWeight of the byte-cost term in the cost score; default 1.0
MinimumSavingsBytesMinimum byte saving required before a recompression is kept; default 1
SampleStridePixel stride used when sampling decoded images for the error measurement; default 4
DefaultClass function returning the values listed above

Usage notes

Related APIs