THPDFImageRecompressionCostInfo Record
視覺成本影像重新壓縮處理的遙測資料:掃描與候選計數、各編碼器的結果、嘗試與拒絕計數器、品質與誤差彙總,以及位元組節省
宣告
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;
單元
HPDFDoc
欄位
| 欄位 | 用途 |
|---|---|
ScannedImageCount | 此處理檢查過的影像數 |
CandidateImageCount | 通過資格檢查後進入品質搜尋的影像數 |
RecompressedImageCount | 實際重新編碼並寫回的影像數 |
RecompressedJPEGCount | 最終濾器為 JPEG 的重新編碼影像數 |
RecompressedJPEG2000Count | 最終濾器為 JPEG 2000 的重新編碼影像數 |
EncodingTrialCount | 掃描品質範圍時執行的試驗編碼次數 |
VisualErrorRejectionCount | 因感知誤差超出預算而遭拒的試驗次數 |
ByteCostRejectionCount | 因位元組成本權重在評分中佔上風而遭拒的試驗次數 |
SelectedQualitySum | 每張重新壓縮影像所選品質的總和,用於計算平均值 |
MaximumSelectedPerceptualError | 獲接受的重新壓縮中最高的感知誤差 |
BytesBefore / BytesAfter | 處理前後的影像串流位元組數 |
BytesSaved | 達成的位元組差額;與選項的最小節省門檻比較 |
DeterministicSelection | 所有回報的選擇都出自確定性成本比較時為 true |
使用說明
- 由
THotPDF.OptimizeLoadedImagesByVisualCost填入;函式結果是重新壓縮的影像數,記錄則承載完整的統計帳目 - 把
SelectedQualitySum除以RecompressedImageCount,即可回報平均選用品質 - 呼叫後讀取
BytesBefore、BytesAfter與BytesSaved,確認此處理達到設定的節省目標