TPDFlibVisualBitmapCompare
Data types, document comparison
Description
Compares two rendered page bitmaps for the rendered-page comparison.
TPDFlib declares the public methods and a protected dispatch method for the rendered-page comparison of two library instances. The edition class supplies the implementation as a callback of this type. A plain TPDFlib instance supplies none, so the call returns the documented empty result and sets LastErrorCode to PDFLIB_ERROR_SMALLBUSINESS_REQUIRED. Application code never declares, assigns or calls a value of this type.
Syntax
Delphi
TPDFlibVisualBitmapCompare = Function(Const First, Second: TPDFVisualBitmap;
Const Options: TPDFVisualCompareOptions; Out Comparison: TPDFVisualCompareResult;
Out ErrorText: WideString): Boolean;Parameters
| First, Second | The two rendered page bitmaps, produced by TPDFlibVisualPageRender at the same resolution |
|---|---|
| Options | TPDFVisualCompareOptions with ColorTolerance, TileSize, IgnoreRects and the mask and overlay requests |
| Comparison | Receives the compared, changed and ignored pixel counts, the changed bounding box and regions, and any requested mask and overlay |
| ErrorText | Receives the failure reason when the result is False |
Return values
| True | The bitmaps were compared, whether or not they differ; Comparison holds the measurements |
|---|---|
| False | The bitmaps differ in size or the comparison could not run; Comparison is empty and ErrorText describes why |
See also
TPDFlibVisualPageRender, CompareRenderedPagesWith, TPDFVisualCompareResult