FoxitPDFSDKforWeb  v10.0.0
Foxit PDF SDK for Web
OverlayComparisonService Class Reference

Overlay comparison function entry, this instance must be obtained through PDFViewer.getOverlayComparisonService method. More...

Public Member Functions

HTMLCanvasElement compareImageData (OverlayComparisonOptions options)
 This method can be used to compare the pixels between two images by overlaying them and generating an output image (HTMLCanvasElement). where the image data can be retrieved from the PDF document via the PDFPage.render API. This method allows you to implement your own difference algorithm, which is achieved by customizing the BlendColorResolver. More...
 

Detailed Description

Overlay comparison function entry, this instance must be obtained through PDFViewer.getOverlayComparisonService method.

See also
PDFViewer.getOverlayComparisonService
Since
9.0.0

Member Function Documentation

◆ compareImageData()

HTMLCanvasElement OverlayComparisonService::compareImageData ( OverlayComparisonOptions  options)

This method can be used to compare the pixels between two images by overlaying them and generating an output image (HTMLCanvasElement). where the image data can be retrieved from the PDF document via the PDFPage.render API. This method allows you to implement your own difference algorithm, which is achieved by customizing the BlendColorResolver.

Parameters
optionsOverlayComparisonOptions - The comparison options object, it must contain at least two attributes sourceBitmap and targetBitmap.
Returns
HTMLCanvasElement - Returns the canvas element as the comparison result
Since
9.0.0

Foxit Software Corporation Logo
@2024 Foxit Software Incorporated. All rights reserved.